stderr and scripting

Ken Moffat ken at
Sat Nov 1 07:28:13 PST 2003

On Sat, 1 Nov 2003, Bill's LFS Login wrote:

> Just reverse the order oof the two redirections and you're good to go.
> The 'man bash' states that order is significant, and it is, but fails to
> also mention the exception, which is not involved woth your problem
> here, but I thought I would mention it. If you are feeding a pipe, &2
> has to be redirectoed to &1 *before*. Otherwise no-go. So
>    cat xyz 2>&1 | less  # Bad example, but it demonstrates the point
> is needed even though the man page indicates that this should not work
> as it does.

Thanks, Bill.  I'll give it a go like that as soon as it gets to the
end of installing glibc.  Funnily enough, I did have it like that at one
time, but "corrected" it.  I guess my former way of doing things ( make
... 2>&1 | tee -a $LOG ) led me to overlook what the man page might say
on this.

Will code payroll for food.

More information about the lfs-support mailing list