Re: Bug in bash
On Mon, Oct 01, 2001 at 11:24:09PM -0400, Roderick Schertler wrote:
> 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. Looking at the bash man page:
When invoked as sh, bash enters
posix mode after the startup files are read.
If
the -e option is given, interpretation of the fol-
lowing backslash-escaped characters is enabled.
The -E option disables the interpretation of these
escape characters, even on systems where they are
interpreted by default.
I can't find any mention of what systems do what by default; presumably
that's determined at compile-time.
The implication being that if it doesn't interpret escapes when invoked
as "sh", it's probably a bug. If it's invoked as "bash", it can do what it
likes, depending on the system.
Or something.
Cheers,
Nick
--
Nick Phillips -- nwp@lemon-computing.com
Don't go surfing in South Dakota for a while.
Reply to: