Log rotation

Seth Gordon sethg at ropine.com
Fri Aug 3 16:53:14 EDT 2001


Hmm, I'll have to look at that Logfile::Rotate module on Monday.  Thanks.

If anyone has entirely too much free time over the weekend, they can
explain to me why this script doesn't copy its input into the log file
(as I expected), but just seems to write a stream of blank lines:

#!/util/bin/bash
trap 'cp log.recent log.`date -I` ' 1 # SIGHUP
trap 'exit 0' 13 # SIGPIPE
while [ read $line ]; do
    echo "$line" >>log.recent
done 

Ciao,

-- 
"Rav would never cross a bridge when an idolator was on it; he said, 'Maybe he
will be judged and I will be taken with him.'  Shmuel would only cross a
bridge when an idolator was on it; he said, 'Satan cannot rule two nations [at
once].'  Rabbi Yannai would examine [the bridge] and cross."  --Shabbat 32a
== Seth Gordon == sethg at ropine.com == http://ropine.com/ == std. disclaimer ==
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list