I want to loop through files in "/test/my project/abc/*" using zsh script on Mac OSX.
path="/test/my project/abc/*"
for file in ${path}; do
something
done
will result in white space not being escaped and error occuring.
I also tried
path="/test/my project/abc/*"
for file in "${path}"; do
something
done
In most other usage this method of escaping would have worked but in the "for ... in ..." case it instead treat the whole "${path}" as a string array and only list the single string.
I am stuck and any help would be appreciated.