[Gllug] adding to a text file using crontab

John Hearns john.hearns at clustervision.com
Fri Sep 3 10:47:56 UTC 2004


On Fri, 2004-09-03 at 11:43, Sharon Kimble wrote:
> Can I ask your advice please?
> 
> In my root crontab I have this line '*/5 * * * * DATE=`date` UPTIME=`uptime` ; 
>  [which is one continuous line 
> although it wraps here] but in uptime.txt it only shows one line of text 
> which is constantly being updated. How can I get it so that it is just adding 
> to the bottom of the text file instead of replacing please?

Methinks:
echo "$DATE $UPTIME" >>/opt/logwatch/uptime.txt'



-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list