Earlier quoted context omitted.
> Like iterating over the files in a directory, for example. If you think that's easy in Bash you have either have a funny definition of easy Maybe I'm overlooking something...but why wouldn't this work: for file in $(ls); do { }; done
$ mkdir "hi there" $ mkdir "how are you" $ ls -l total 8 drwxr-xr-x 2 xxxxxxxx xxxx 4096 Jun 26 14:54 hi there drwxr-xr-x 2 xxxxxxxx xxxx 4096 Jun 26 14:54 how are you $ for f in $(ls); do echo $f; done hi there how are you
find . -type d
or set IFS. IFS='
'
or
IFS='\n'
then reset it later. Perhaps store existing IFS in a variable so you can put it back. The \n vs actual line feed has to do with an edge case in cygwin and dos files.