Thanks to all who replied, I have seen where my error is and have
numerous alternatives, the task is now underway properly.

Cheers
SImon

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Sonia Hamilton
> Sent: Wed, 11. May 2005 3:19 PM
> To: [email protected]
> Subject: Re: [SLUG] Script Help
> 
> 
> * On Wed, May 11, 2005 at 01:48:35PM +1000, Simon wrote:
> > Hi all,
> > Why is the following script ripping out every directory rather than 
> > just those in 'studentfile'
> > 
> > #!/bin/bash
> > while read name; do
> >  cd $name
> 
> Fails here if directory $name doesnt exist; next line deletes 
> everything.
> 
> >  rm -fvr *
> >  cd ..
> >  rmdir $name
> > done < studentlist
> 
> --
> Sonia Hamilton. GPG key A8B77238.
> .
> Type cat vmlinuz > /dev/audio to hear the voice of $DEITY.
> -- 
> SLUG - Sydney Linux User's Group Mailing List - 
http://slug.org.au/ Subscription info and FAQs:
http://slug.org.au/faq/mailinglists.html

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to