[sllug-members]: stderr + less
Ian Robertson
ian at red-bean.com
Fri May 5 09:28:18 MDT 2006
On Thu, 2006-05-04 at 13:32 -0600, Corey Edwards wrote:
> 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".
In zsh, there's similar shortcut for piping: "foo |& less".
- Ian
More information about the sllug-members
mailing list