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

On Wednesday 25 June 2003 01:14, Simon Waters wrote:
> 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 "*?*"

Seems like a fair guess.  I tried it with a different replacement string (I 
hop I modified it correctly) just to see if it didn't like the "?":

NEWNAME=`expr "$AFILE" : "\(.*\)fred"`

But it still spat out all the same errors :-(

> 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.

Yep, just gives all the same rubbish with slightly different syntax.

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

There aren't any spaces in the filenames either (these are all web pages), but 
I changed it anyway.

>  It's been one of those weeks :-(

I know how you feel :-(  My ecommerce suite is as slow as treacle, because my 
service provider downgraded my RAM because they thought that's what made the 
hard drive fail (eh?!).  Which means my client isn't very happy and I don't 
get paid :-(

I'm trying to build a 'static mirroring' system with wget, which will allow me 
to use mr-speedy-gonzales-Apache to serve the site instead, which should get 
it up to at least 40 requests/sec.  And then they might pay me :-)

So thanks for your help!

Jon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE++YrmeTVvFHAhe5cRArFQAJ91mH53TghiR7y3yeS/bmtXgqielgCeI+qu
ctYGuYdeRm6qj+rywmUEedE=
=MGTI
-----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