[ale] shell scripting baby questions...
Keith Morris
graphicsguy at charter.net
Fri Feb 20 12:40:51 EST 2004
good idea!
thanks!!
Yu, Jerry wrote:
> You may want to delete only if the tar finished succsfully:
>
> tar -czf $logName.tgz $logName && rm -f $logName;
>
> -----Original Message-----
> From: Keith Morris - IQ [mailto:keith at iqtv.com]
> Sent: Friday, February 20, 2004 12:13 PM
> To: Atlanta Linux Enthusiasts
> Subject: Re: [ale] shell scripting baby questions...
>
>
> 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
>>
More information about the Ale
mailing list