bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the -v output is not following exec 2>


From: Paul Jarc
Subject: Re: the -v output is not following exec 2>
Date: Thu, 26 Dec 2002 11:44:07 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu)

Dan Jacobson <jidanni@dman.ddts.net> wrote:
> Description:
>       can't properly redirect -v output
>
> Repeat-By:
> (set -v;exec 2>&1 1>/tmp/a;echo aa)

man bash:
       Note that the order of redirections is  significant.   For
       example, the command

              ls > dirlist 2>&1

       directs  both  standard  output  and standard error to the
       file dirlist, while the command

              ls 2>&1 > dirlist

       directs only the standard output to file dirlist,  because
       the  standard  error  was  duplicated  as  standard output
       before the standard output was redirected to dirlist.
...
       set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
              -v      Print shell input lines as they are read.

Your subshell never reads any input lines.


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]