Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jan 2006 02:35:54 -0500
From:      Ronny Hippler <r11roadster@yahoo.com>
To:        freebsd questions <freebsd-questions@freebsd.org>
Subject:   shell scripts and escaped charecters in file names 
Message-ID:  <43C9FB5A.2050506@yahoo.com>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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!

- --

Backup not found: (A)bort (R)etry (P)anic

Ronny Hippler || Spartanburg SC
http://www.ronnyhippler.com/ || ftp://ftp.vr5.dyndns.org:2112/
PGP key: http://www.ronnyhippler.com/Ronny_Hippler_PGP.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDyftaN6qJSxoonroRAo/bAJ4hLG6hKvol/bnKFcfPL8cwES6c7wCbBC2s
U1nF938YAhkfCeYasCA/Gtk=
=uU/t
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43C9FB5A.2050506>