On Tue, Apr 22, 2014 at 07:06:41PM -0300, Daniel Bareiro wrote:
> 
> Hi all!
> 
> I'm writing a bash script that runs several routing commands. I would
> like these commands, on a part of the script, plus run, are saved to a
> log file.
> 

If you have bsdutils installed have a look at the "logger" command. It
will let your script send messages to the system logs, and you can
pipe command output into it for use in the log entry.

For example, if I type:
   date | logger

I get:
   Apr 22 20:13:47 hedorah dave: Tue Apr 22 20:13:47 MDT 2014
   
in /var/log/syslog.

hth

dt

-- 
Dave Thayer / Denver, Colorado USA / d...@thayer-boyle.com 
 Whenever you read a good book, it's like the author is right there, in
 the room talking to you, which is why I don't like to read good books.
 - Jack Handey "Deep Thoughts"


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140423021515.ga20...@thayer-boyle.com

Reply via email to