I am looking to automate my xcode projects. It all works fine except the projects name with spaces. I have tried the following commands:
output_apps=`find ./ -name "*.app" -print`
output_apps=`find ./ -name "*.app"`
When I run
find ./ -name "*.app" -print
without storing into variable, it gives me output as expected as mentioned below:
.//Ten EU.app
.//Ten Official App EU.app
.//Ten Official App.app
.//Ten.app
However when I store the output of above command in a variable as below
output_apps=`find ./ -name "*.app" -print`
and then run the following for loop for get the names
for curr_app in $o
do
echo "$curr_app"
done
It shows
.//Ten
EU.app
.//Ten
Official
App
EU.app
.//Ten
Official
App.app
.//Ten.app
How do I maintain the spaces between each output and get the following output?
Ten EU.app
Ten Official App EU.app
Ten Official App.app
Ten.app