tee and some commands
On Tue, 22 Mar 2011, Leo "TheHobbit" Cacciari wrote:
> Hi chaps
> Anyone noticed that tee doesnÊ¼t seem to log the output from some commands to a
> log file?
> I am using tee in a script on the following line;
> Â*Â*Â* ncftpput -u $ftp_user -p $ftp_pass -R -m -v ftp.mydomain.local /
> $dest/archives/$1/ | tee -a $out_file
it's entirely possible that what's coming out of the previous
command is being sent to stderr, whereas only stdout is passed
through a pipe by default.
if you want both stdout and stderr to be processed by the pipe, use
blah blah 2>&1 | going here
the "2>&1" forces stderr to follow stdout, at which point both streams
go to the pipe.
Robert P. J. Day Waterloo, Ontario, CANADA
ubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users