From: Steve Devine (sdevine@msu.edu)
Date: Tue May 28 2002 - 11:14:48 EDT
All
Thanks .. all great replies unfortunately still no cigar.
Has any one used scp with commercial ssh and done what I am attempting?
This is the data I want to capture .. this is what you get when you do a
regular scp from the command line.
/usr/local/bin/scp file.tar user@server:/tmp
| file.tar 1.8MB | 1880.0 kB/s | TOC: 00:00:01 | 100%
I want to get the above output into a file suitable for email notification of
success / failure.
ALL I seem to get is either an empty file or scp balks and will not copy the
file over to the remote server.
/sd
<Previous Email>
Thanks for all the suggestions. It still doesnt work.
I put some samples below.
I ran these from the command line in a sh shell.
I have these two machine doing hostbased auth. (no password required)
First try
/usr/local/bin/scp file.tar user@server:/tmp 2>&1 1>/tmp/output
empty /tmp/output
Second try
/usr/local/bin/scp file.tar user@server:/tmp2 >&1 >/tmp/output
scp: warning: File tmp is a directory, and recursion is not enabled.
Third try
/usr/local/bin/scp file.tar user@server:/tmp 2 > & 1 /tmp/output
Gives an empty /tmp/output
Forth Try
/usr/local/bin/scp file.tar user@server:/tmp > /tmp/output
Gives an empty /tmp/output
Fifth Try
/usr/local/bin/scp file.tar user@server:/tmp > tmp/output 2 >&1
Thanks to all
/sd
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:23 EDT