[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



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-----
&gt; From: Keith Morris - IQ [<a  rel="nofollow" href="mailto:keith";>mailto:keith</a> at iqtv.com]
&gt; Sent: Friday, February 20, 2004 12:13 PM
&gt; To: Atlanta Linux Enthusiasts
&gt; Subject: Re: [ale] shell scripting baby questions...
&gt; 
&gt; 
&gt; Thanks everyone!!! you rock.  Here was the solution:
&gt; 
&gt; # if no virii were detected, deltet infected log file.
&gt; if [ $infectionsDetected -eq 0 ]
&gt; then
&gt;    rm -f $logPath/$infectedLogName;
&gt; fi
&gt; 
&gt; # tar and gzip the scan logfile and remove the uncompressed log
&gt; cd $logPath
&gt; tar -czf $logName.tgz $logName;
&gt; rm -f $logName;
&gt; 
&gt; Johnny Preyer wrote:
&gt; 
&gt; 
&gt;&gt;and eq should be -eq, eq is used in perl for string equality comparison,
&gt;&gt;isn't it?
&gt;&gt;
&gt;&gt;-----Original Message-----
&gt;&gt;From: Nathan J. Underwood [<a  rel="nofollow" href="mailto:lists";>mailto:lists</a> at cybertechcafe.net]
&gt;&gt;Sent: Friday, February 20, 2004 11:15 AM
&gt;&gt;To: Atlanta Linux Enthusiasts
&gt;&gt;Subject: Re: [ale] shell scripting baby questions...
&gt;&gt;
&gt;&gt;
&gt;&gt;-----BEGIN PGP SIGNED MESSAGE-----
&gt;&gt;Hash: SHA1
&gt;&gt;
&gt;&gt;Ok, I'm gonna step out on a limb here.  Do you need the quotation marks
&gt;&gt;around the 0 in this case?  Also, should the variable name have quotes
&gt;&gt;around it?
&gt;&gt;
&gt; 
&gt; 
&gt;&gt;~  if [ &quot;$infectionsDetected&quot; eq 0 ]
&gt;&gt;~  then
&gt;&gt;~    rm -f $logPath/$infectedLogName
&gt;&gt;~  fi
&gt;&gt;
&gt;&gt;nathan
&gt;&gt;


</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>