Re: redirection after braced block

2009-10-06 Thread Marc Herbert
Greg Wooledge a écrit : > On Mon, Oct 05, 2009 at 07:55:33PM +0200, clemens fischer wrote: { ... a number of commands } 2>&1 | ${prog_log} "${logfile}" > > If you're having trouble debugging your script, and you want to be > absolutely sure whether the commands in the bra

Re: redirection after braced block

2009-10-05 Thread clemens fischer
Matthew Woehlke wrote: >>> clemens fischer writes: >>> I have the following construct in a script: ... a number of commands { ... a number of commands } 2>&1 | ${prog_log} "${logfile}" It seems anything inside the braces is not seen by bash, and

Re: redirection after braced block

2009-10-05 Thread Chet Ramey
clemens fischer wrote: > I have the following construct in a script: > > ... a number of commands > { > ... a number of commands > } 2>&1 | ${prog_log} "${logfile}" > > It seems anything inside the braces is not seen by bash, and it doesn't > show up in a "sh -x ..." trace, but ${pro

Re: redirection after braced block

2009-10-05 Thread Greg Wooledge
On Mon, Oct 05, 2009 at 07:55:33PM +0200, clemens fischer wrote: > >> { > >> ... a number of commands > >> } 2>&1 | ${prog_log} "${logfile}" > yeah ok, but the commands really are not executed. I have an option > dry-run in the script, which sets "prog_log=true". Then there are > a bun

Re: redirection after braced block

2009-10-05 Thread Matthew Woehlke
clemens fischer wrote: Andreas Schwab wrote: clemens fischer writes: I have the following construct in a script: ... a number of commands { ... a number of commands } 2>&1 | ${prog_log} "${logfile}" It seems anything inside the braces is not seen by bash, and it doesn't show up

Re: redirection after braced block

2009-10-05 Thread clemens fischer
Andreas Schwab wrote: > clemens fischer writes: > >> I have the following construct in a script: >> >> ... a number of commands >> { >> ... a number of commands >> } 2>&1 | ${prog_log} "${logfile}" >> >> It seems anything inside the braces is not seen by bash, and it >> doesn't show u

Re: redirection after braced block

2009-10-05 Thread Andreas Schwab
clemens fischer writes: > I have the following construct in a script: > > ... a number of commands > { > ... a number of commands > } 2>&1 | ${prog_log} "${logfile}" > > It seems anything inside the braces is not seen by bash, and it doesn't > show up in a "sh -x ..." trace, but ${pro

redirection after braced block

2009-10-05 Thread clemens fischer
'uname -rims' Linux 2.6.31.1-spott i686 AuthenticAMD 'bash --version' GNU bash, version 4.0.24(1)-release (i686-pc-linux-gnu) I have the following construct in a script: ... a number of commands { ... a number of commands } 2>&1 | ${prog_log} "${logfile}" It seems anything inside th