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: 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 <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?

Why would sh be something differe...

    address@hidden:~ $ 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

Attachment: signature.asc
Description: Digital signature


reply via email to

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