[Gllug] adding to a text file using crontab

andy at mac1systems.com andy at mac1systems.com
Fri Sep 3 10:48:29 UTC 2004


> Can I ask your advice please?
>
> In my root crontab I have this line '*/5 * * * * DATE=`date`
> UPTIME=`uptime` ;  echo "$DATE $UPTIME" >/opt/logwatch/uptime.txt'
> [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?
>
Try >>/opt/logwatch/uptime.txt

Andy



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




More information about the GLLUG mailing list