bash: capturing the stdout/stderr of a cmd to system log?

From: Thomison, Lee <ThomisonL@ci.anchorage.ak.us>
Date: Tue Jun 29 2004 - 15:51:58 AKDT

Hey folks,

Doing some scp'ing in bash and trying to make sure the output is
captured to the system log.

Bad scp:

$ scp sysxfer@remote:/cygdrive/c/remotefile localcopy
scp: /cygdrive/c/puf/doodah: No such file or
directoryame@host:sourcefile destfile=20

Good scp:

$ scp sysxfer@remote:/cygdrive/c/DATA localDATA
DATA
100% 5064 5.0KB/s 00:00

I want to capture -both- the errors ('no such file') -and- the
successful (100% 5064 etc) scp.

I would expect it to be something like:

$ scp sysxfer@dsp_puffin:/cygdrive/c/DATA localDATA 2>&1 | logger

but that just logs the error, not the success. I suspect the 'success'
is actually trying to return a 'null' string to indicate success, maybe?

What am I doing wrong here?

Thanks folks!

Lee
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Jun 29 15:52:06 2004

This archive was generated by hypermail 2.1.8 : Tue Jun 29 2004 - 15:52:08 AKDT