[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Fri Feb 20 12:40:51 2004 -->
- <!--x-from-r13: tencuvpfthl ng punegre.arg (Yrvgu [beevf) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] shell scripting baby questions... -->
- <li><em>date</em>: Fri Feb 20 12:40:51 2004</li>
- <li><em>from</em>: graphicsguy at charter.net (Keith Morris)</li>
- <li><em>in-reply-to</em>: <<a href="msg00749.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00749.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] shell scripting baby questions...</li>
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 [<a rel="nofollow" href="mailto:keith">mailto:keith</a> 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 [<a rel="nofollow" href="mailto:lists">mailto:lists</a> 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
>>
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00749" href="msg00749.html">[ale] shell scripting baby questions...</a></strong>
<ul><li><em>From:</em> jerry.yu at Voicecom.com (Yu, Jerry)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00750.html">[ale] NW meeting last night</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00752.html">[ale] Linux Security article</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00749.html">[ale] shell scripting baby questions...</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00752.html">[ale] Linux Security article</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00751"><strong>Date</strong></a></li>
<li><a href="threads.html#00751"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>