[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] stdout and stderr to two different process substitutions
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] stdout and stderr to two different process substitutions |
Date: |
Wed, 25 Jan 2012 10:25:38 -0500 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, Jan 25, 2012 at 09:21:36AM -0600, Peng Yu wrote:
> > First of all, 1>&2 literally does mean "redirect stdin to where stderr is
> > currently pointing". That's what it's for.
>
> You interpretation seems to be different from what is explained here.
> Do I misunderstand anything here?
Sorry, I mistyped. I should have written "redirect stdout to where stderr
is currently pointing".
> http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html
>
> "3.4 Sample: stdout 2 stderr
>
> This will cause the stderr ouput of a program to be written to the
> same filedescriptor than stdout.
>
> grep da * 1>&2
> "
THAT explanation, however, is quite wrong. 1>&2 is a redirection of
stdout, not of stderr. It changes where FD 1 (stdout) goes. It does
not change where FD 2 (stderr) goes.
There are numerous errors in the "ABS" guide, so you must be prepared to
unlearn anything you learn from it.
- [Help-bash] stdout and stderr to two different process substitutions, Peng Yu, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Pierre Gaston, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Bob Proulx, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Peng Yu, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Pierre Gaston, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Bob Proulx, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Peng Yu, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Greg Wooledge, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Peng Yu, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions,
Greg Wooledge <=
- Re: [Help-bash] stdout and stderr to two different process substitutions, Peng Yu, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Peng Yu, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Greg Wooledge, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Peng Yu, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Greg Wooledge, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Peng Yu, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Greg Wooledge, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Chet Ramey, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Bob Proulx, 2012/01/25
- Re: [Help-bash] stdout and stderr to two different process substitutions, Greg Wooledge, 2012/01/25