SLUG Mailing List Archives
Re: [SLUG] sending output to both screen and log file, how ?
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] sending output to both screen and log file, how ?
- From: Jamie Wilkinson <jaq@xxxxxxxxxxxxxx>
- Date: Fri, 20 Aug 2004 00:58:01 +1000
- Reply-by: Sat, 10 Jul 2004 23:51:49 +1000
- User-agent: Mutt/1.5.6+20040722i
This one time, at band camp, Glen Turner wrote:
>On Thu, 2004-08-19 at 07:36, Voytek Eymont wrote:
>> I have something like:
>> echo "$now $0 executed for $DOMAIN on in $exectime sec" >> /var/log/awstats.log
>> how can I also send it to screen without repeating the echo line ?
>Do your sysadmins a favour and use the "logger" command to write log
>messages via the syslog facility. "logger" has a "-s" option to write to
>stderr (the screen) as well as to the system log.
Add some SNMP traps for good measure :-)