[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about behavior of redirections inside an if construct
From: |
Thomas Schwinge |
Subject: |
Re: Question about behavior of redirections inside an if construct |
Date: |
Thu, 29 Jan 2009 18:26:21 +0100 |
User-agent: |
Mutt/1.5.11 |
Hello!
On Thu, Jan 29, 2009 at 05:47:53PM +0100, Andreas Schwab wrote:
> Thomas Schwinge <tschwinge@gnu.org> writes:
> > These three work as expected. But why doesn't the following one?
> >
> > thomas@dirichlet:~ $ sh -c 'if : 2> /dev/null < NONEXISTING_FILE; then
> > :; else echo >&2 OK; fi'
>
> Works fine here. Are you sure sh is Bash?
Why would sh be something differe...
thomas@dirichlet:~ $ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2007-12-25 23:16 /bin/sh -> dash
Jeez.
That's Ubuntu intrepid 0.5.4-9ubuntu1 version. Unless someone beats me
to it, or it is fixed already, I'll take it up with them, sometime later.
Andreas: Thanks for pointing out the obvious!
Regards,
Thomas
signature.asc
Description: Digital signature