-----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 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.
>
> could try tee
>
> echo "Test" | tee /var/log/awstats.log
>
>
>
>>
>> -- 
>> Glen Turner         Tel: (08) 8303 3936 or +61 8 8303 3936
>> Australian Academic & Research Network   www.aarnet.edu.au
>>
>> -- 
>> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
>> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>>
> -- 
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1

iQA/AwUBQSP2pCefczxd8aNGEQJyKgCgib/oO2nFdI2VeziNCpQDHREyay8An3Lo
uvRhYOHL3pbmGqYH258XUOd7
=9G86
-----END PGP SIGNATURE-----

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to