shell scripts and escaped charecters in file names

Ronny Hippler r11roadster at
Sun Jan 15 09:21:09 PST 2006

Hash: SHA1

je killen wrote:
| On Jan 14, 2006, at 11:35 PM, Ronny Hippler wrote:
| Hello,
|     I am trying to get the following script to run with no success.
| ------------------------------------
| #!/bin/csh
| foreach file (\*vol\*)
| mv $file `basename $file .par2`.PAR2
| echo $file
| end
| ------------------------------------
| and get the following error:
| usage: mv [-f | -i | -n] [-v] source target
| ~       mv [-f | -i | -n] [-v] source ... directory
| I know it is because of the spaces and such in the file names. I have
| tried quoting single double and also escaping them but all fails. what
| is the magic? Please cc me off list. thanks!
|> tried %20 for space?

can't cause the file name is being inserted by a variable on the fly I
would have to do a rewrite of the filenames in the script and would need
to know all of the characters that needed to be escaped.

on that note is there a definitive list of all characters that need to
be escaped in a file name? Thanks

please cc me off list. thanks again

- --

I don't need a new harddrive, there's 3k free.

Ronny Hippler || Spartanburg SC ||
PGP key:
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla -


More information about the freebsd-questions mailing list