<br><font size=2 face="sans-serif">You'd probably be better off adding
it to logrotate, but this should work as a cronjob:</font>
<br><font size=2 face="sans-serif">30 7 * * Mon-Fri &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[ -f /var/log/mondo-archive.log
] &amp;&amp; mv /root/backuplogs/mondo-archive.log.`date +%Y%m%d`</font>
<br><font size=2 face="sans-serif">or this:</font>
<br><font size=2 face="sans-serif">30 7 * * Mon-Fri &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;( TODAYSDATE=`date +%Y%m%d`;
[ -f /var/log/mondo-archive.log ] &amp;&amp; mv /root/backuplogs/mondo-archive.log.$TODAYSDATE
)</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Erick Perez &lt;eaperezh@gmail.com&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: whitebox-users-bounces@beau.org</font>
<p><font size=1 face="sans-serif">03/31/2005 11:22 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Erick Perez &lt;eaperezh@gmail.com&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">whitebox-users@beau.org</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">[WBEL-users] quick script
help</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Hi there, &nbsp;i need some help with a quick script
(im not very good with<br>
perl, still learning)<br>
<br>
i want to run a cron at certain time in the morning and that cron should:<br>
1- check for file named /var/log/mondo-archive.log<br>
2- if exists move the file to /root/backuplogs/mondo-archive.log.TODAYSDATE<br>
<br>
how do i extract todays date(format MMDDYY), save it into a variable<br>
and then append it to the filename<br>
<br>
thanks,<br>
-- <br>
<br>
-------------------------------------------<br>
Erick Perez<br>
Linux User 376588<br>
http://counter.li.org/ &nbsp;(Get counted!!!)<br>
Panama, Republic of Panama<br>
_______________________________________________<br>
Whitebox-users mailing list<br>
Whitebox-users@beau.org<br>
http://beau.org/mailman/listinfo/whitebox-users<br>
</tt></font>
<br>