D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] I'm back :-)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan Melhuish wrote:
>
> Hmm, looks good, but it seems to b0rk at every single command.  It
just says:
>
> [jon@xxxxxx www.smssat.biz]$ ./vchop.sh
> ./vchop.sh: line 4: NEWNAME=./advancedsearch.html: No such file or
directory

> I'm not sure quite what I did to it!  The shebang line looks
alright...  :-(

Me neither.

Hmm the "for" statement isn't as robust as I should make it, it fails if
no file are found in the current directory. My guess is that it expanded
something odd with "*?*"

Try "sh -x vchop.sh" see if anything obvious is wrong, try a directory
with one or two files "mkdir fred ; touch a?1 b?2" etc etc.

Quotes on the "mv" handle spaces in file names better.
mv "$AFILE" "$NEWNAME"

 It's been one of those weeks :-(
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE++Ol6GFXfHI9FVgYRAm0CAKC+YuY6QKmJS5/SE7ojZzJGu7eTRwCgnEd5
Gj6UFiNWV3BaIx6FMkgoj3o=
=6V0E
-----END PGP SIGNATURE-----

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly