Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Log rotation



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).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org