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

Re: Bug in bash



On Tue, 2 Oct 2001 12:12:38 +0100, Nick Phillips <nwp@lemon-computing.com> said:
>
>> This turns out not to be the case.  POSIX[1] says that echo does handle
>> the \ escapes, and doesn't honor -n.  Neither bash nor ash (both invoked
>> as sh) behaves quite this way.
>
> Invocation is probably very relevant.

Of course.  That's why i said they behave this way when invoked as sh.

> I can't find any mention of what systems do what by default; presumably
> that's determined at compile-time.

Even when given --posix bash's echo doesn't behave like POSIX echo.

> The implication being that if it doesn't interpret escapes when invoked
> as "sh", it's probably a bug.

Sure, but it isn't a bug we can actually fix.  If either shell actually
did what POSIX says, all the maintainer scripts which use "echo -n"
would break.

-- 
Roderick Schertler
roderick@argon.org



Reply to: