> -----Original Message----- > From: Michael Chesterton [mailto:[EMAIL PROTECTED] > Sent: Sunday, 8 October 2006 10:30 AM > To: Christopher Martin > Cc: slug@slug.org.au > Subject: Re: [SLUG] Script headaches > > Is this what you want? > > truncname=`basename $i .gz`
Perfect! Thanks for the help! For reference, here's the complete script: #!/bin/sh RBLFILES=/var/rbldnsd echo "SURBL files processing" n=0 cd "$RBLFILES" for i in *.surbl.org.rbldnsd.gz do n=`expr $n + 1` echo "Processing #$n [$i]" truncname=`basename $i .gz` /usr/bin/gzcat $i > $RBLFILES/$truncname Done I had never head of basename before. Thanks for the tip! -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html