[lug] bash scripting question

Hugh Brown hugh at math.byu.edu
Fri Nov 18 08:45:53 MST 2005


I've had this problem a few times and haven't found a quick way to get
around it.  I often do per file operations at the bash prompt with
something like this:

for i in `ls`; do
command $i| othercommand
done

The problem is that if the files have spaces in them, then things break.

Is there some bash'ism that would allow me to get this to work.



Hugh



More information about the LUG mailing list