[ale] shell scripting baby questions...
Keith Morris - IQ
keith at iqtv.com
Fri Feb 20 12:14:31 EST 2004
Thanks everyone!!! you rock. Here was the solution:
# if no virii were detected, deltet infected log file.
if [ $infectionsDetected -eq 0 ]
then
rm -f $logPath/$infectedLogName;
fi
# tar and gzip the scan logfile and remove the uncompressed log
cd $logPath
tar -czf $logName.tgz $logName;
rm -f $logName;
Johnny Preyer wrote:
> and eq should be -eq, eq is used in perl for string equality comparison,
> isn't it?
>
> -----Original Message-----
> From: Nathan J. Underwood [mailto:lists at cybertechcafe.net]
> Sent: Friday, February 20, 2004 11:15 AM
> To: Atlanta Linux Enthusiasts
> Subject: Re: [ale] shell scripting baby questions...
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ok, I'm gonna step out on a limb here. Do you need the quotation marks
> around the 0 in this case? Also, should the variable name have quotes
> around it?
>
> ~ if [ "$infectionsDetected" eq 0 ]
> ~ then
> ~ rm -f $logPath/$infectedLogName
> ~ fi
>
> nathan
>
--
:: Keith Morris
:: Creative Director
:: Design / Effects
:: IQ television group
:: Atlanta, GA
:: 404.255.3550
:: http://www.iqtv.com
More information about the Ale
mailing list