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

[no subject]



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:

&gt; and eq should be -eq, eq is used in perl for string equality comparison,
&gt; isn't it?
&gt; 
&gt; -----Original Message-----
&gt; From: Nathan J. Underwood [<a  rel="nofollow" href="mailto:lists";>mailto:lists</a> at cybertechcafe.net]
&gt; Sent: Friday, February 20, 2004 11:15 AM
&gt; To: Atlanta Linux Enthusiasts
&gt; Subject: Re: [ale] shell scripting baby questions...
&gt; 
&gt; 
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt; 
&gt; Ok, I'm gonna step out on a limb here.  Do you need the quotation marks
&gt; around the 0 in this case?  Also, should the variable name have quotes
&gt; around it?
&gt; 

&gt; ~  if [ &quot;$infectionsDetected&quot; eq 0 ]
&gt; ~  then
&gt; ~    rm -f $logPath/$infectedLogName
&gt; ~  fi
&gt; 
&gt; nathan
&gt; 
-- 
:: Keith Morris
:: Creative Director
:: Design / Effects
:: IQ television group
:: Atlanta, GA
:: 404.255.3550
:: <a  rel="nofollow" href="http://www.iqtv.com";>http://www.iqtv.com</a>

_______________________________________________
Ale mailing list
Ale at ale.org
<a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00751" href="msg00751.html">[ale] shell scripting baby questions...</a></strong>
<ul><li><em>From:</em> graphicsguy at charter.net (Keith Morris)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00748.html">[ale] shell scripting baby questions...</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00750.html">[ale] NW meeting last night</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00748.html">[ale] shell scripting baby questions...</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00751.html">[ale] shell scripting baby questions...</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00749"><strong>Date</strong></a></li>
<li><a href="threads.html#00749"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>