How to use foreach on filenames with spaces?
say I have some file names with spaces, like so:
New Text Document (2).txt New Text Document.txt
(there are two files there)
and I want to loop over them and do something to them in a foreach loop, like so:
$ foreach f ( `find . -name \* -print0` )
foreach? echo $f
obviously, that's not the output I want, I need to get the actual file name as opposed to their bits so I can do something to the file. Is there a way to do this? I'm using tcsh