bug-bash
[Top][All Lists]
Advanced

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

Re: Question about behavior of redirections inside an if construct


From: Andreas Schwab
Subject: Re: Question about behavior of redirections inside an if construct
Date: Thu, 29 Jan 2009 17:47:53 +0100
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.3 (gnu/linux)

Thomas Schwinge <address@hidden> writes:

> These three work as expected.  But why doesn't the following one?
>
>     address@hidden:~ $ 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, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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