TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [TCLUG:3621] Logfile?
> -----Original Message-----
> From: Scott K. Johnson [mailto:skj@visi.com]
> Sent: Thursday, January 21, 1999 4:04 PM
> To: TCLUG
> Subject: [TCLUG:3621] Logfile?
>
>
> Hello all,
>
> Is it possible for me to generate entries into a specified logfile?
>
> Like a script that executes, and generates entries into /var/adm/messages?
>
Well, the obvious answer would be:
echo "$TEXT" >> /var/log/messages
The ">>" means "append", as opposed to ">", which overwrites the old file.
Of course, the script would have to run with root permissions, and you'd
have to make sure that $TEXT included the date & time.
Maybe there's a tool that does this automatically, though.