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

Re: /bin/sh as an alternative



On Fri, 16 Jan 1998, Hamish Moffatt wrote:

> On Fri, Jan 16, 1998 at 12:08:47AM +0100, Remco Blaakmeer wrote:
> > Yes, I can only agree. But is bash actually completely POSIX-compliant
> > (and nothing more than that) when called as /bin/sh ?
> 
> It would appear not:
> 
> sh-2.01$ echo hello {there,world}
> hello there world

>From the bash man page:

       Bash is ultimately intended to be a conformant implementa
       tion of the IEEE POSIX Shell and Tools specification (IEEE
       Working Group 1003.2).

...

       If bash is invoked with the name sh, it tries to mimic the
       startup behavior of historical versions of sh  as  closely
       as  possible,  while  conforming  to the POSIX standard as
       well.

So, if POSIX says that the example above should be

$ echo hello {there,world}
hello {there,world}

then this is a bug in bash, IMHO. Can somebody check bash for other
non-POSIX features is has when called as `sh' and file bug reports for
them?

Remco


Reply to: