[plug] Simple bash scripting problem

Timothy White weirdit at gmail.com
Mon Oct 10 17:36:55 WST 2005


Ok. So this should be easy. I don't want to write this script in perl,
I have most of it in bash already so I would like a nice simple
answer. (Google's not being my friend, probably cause I'm tired)

This script basically does a number of operations on a list of files.
The problem is getting the list to work.

I call the script similar to this "script *.flac" and what it to
obviously work on all the flac files... bash expands the *.flac to a
list of files. Unfortunately all the files have spaces in the names...
So the 'for list in word' part splits it on the spaces! What is the
easy solution?

Thanks

Tim
[1] The problem part....
for file in $*; do

if test -f $file; then



More information about the plug mailing list