Re: Question about behavior of redirections inside an if construct

2009-01-29 Thread Chet Ramey
> > Works fine here. Are you sure sh is Bash? > > Why would sh be something differe... It's a mystery. :-) Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRUc...@case.eduhttp://tiswww.tis.case.edu/~chet/

Re: Question about behavior of redirections inside an if construct

2009-01-29 Thread Thomas Schwinge
Hello! On Thu, Jan 29, 2009 at 05:47:53PM +0100, Andreas Schwab wrote: > Thomas Schwinge writes: > > These three work as expected. But why doesn't the following one? > > > > tho...@dirichlet:~ $ sh -c 'if : 2> /dev/null < NONEXISTING_FILE; then > > :; else echo >&2 OK; fi' > > Works fine h

Re: Question about behavior of redirections inside an if construct

2009-01-29 Thread Andreas Schwab
Thomas Schwinge writes: > These three work as expected. But why doesn't the following one? > > tho...@dirichlet:~ $ sh -c 'if : 2> /dev/null < NONEXISTING_FILE; then :; > else echo >&2 OK; fi' Works fine here. Are you sure sh is Bash? Andreas. -- Andreas Schwab, SuSE Labs, sch...@suse.