Re: [SLUG] sending output to both screen and log file, how ?

2004-08-19 Thread Jamie Wilkinson
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 sy

Re: [SLUG] sending output to both screen and log file, how ?

2004-08-18 Thread Glen Turner
On Thu, 2004-08-19 at 10:09, Shane MacPhillamy wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Instead of tee the following should work also: > > echo "$now $0 executed for $DOMAIN on in $exectime sec" 1>&2 >> > /var/log/awstats.log OK. Now try and set up a centralised log host for

RE: [SLUG] sending output to both screen and log file, how ?

2004-08-18 Thread Roger Barnes
> Instead of tee the following should work also: > > echo "$now $0 executed for $DOMAIN on in $exectime sec" 1>&2 > >> /var/log/awstats.log I think you may mean: echo "$now $0 executed for $DOMAIN on in $exectime sec" >> /var/log/awstats.log 1>&2 [tested] - Rog -- SLUG - Sydney Linux User's

Re: [SLUG] sending output to both screen and log file, how ?

2004-08-18 Thread Shane MacPhillamy
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Instead of tee the following should work also: echo "$now $0 executed for $DOMAIN on in $exectime sec" 1>&2 >> /var/log/awstats.log Cheers Shane On 19 Aug 2004, at 9:41 AM, Alexander Samad wrote: > On Thu, Aug 19, 2004 at 08:55:28AM +0930, Glen Tur

Re: [SLUG] sending output to both screen and log file, how ?

2004-08-18 Thread Alexander Samad
On Thu, Aug 19, 2004 at 08:55:28AM +0930, 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 l

Re: [SLUG] sending output to both screen and log file, how ?

2004-08-18 Thread Glen Turner
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 l

Re: [SLUG] sending output to both screen and log file, how ?

2004-08-18 Thread Jeff Ai
tee is the answer. echo "$now $0 executed for $DOMAIN on in $exectime sec" | tee /var/log/awstats.log 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 ? Voy

Re: [SLUG] sending output to both screen and log file, how ?

2004-08-18 Thread Benno
On Wed Aug 18, 2004 at 22:06:54 +, 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 ? man tee echo "$now $0 executed for $DOMAIN on in $exectime s

[SLUG] sending output to both screen and log file, how ?

2004-08-18 Thread Voytek Eymont
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 ? Voytek -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.