[sllug-members]: stderr + less

Corey Edwards tensai at zmonkey.org
Thu May 4 13:32:04 MDT 2006


On Thu, 2006-05-04 at 13:23 -0600, Kurt Mahan wrote:
> First redirect stdout(fd 1), then add a redirection of stderr(fd 2) to 
> stdout.  Remember that sh parses args left to right.  So you need to deal
> with stdout BEFORE redirecting stderr to it!  (why yes, I learned that
> lesson the hard way long ago..)
> 
> So to send BOTH stdout and stderr to /tmp/out:
> 	foo > /tmp/out 2>&1

The shortcut for this is "foo &>/tmp/out".

Corey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://sllug.org/pipermail/sllug-members/attachments/20060504/815653b7/attachment.pgp


More information about the sllug-members mailing list