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

Re: ash - options to `echo' command



On Thu, Oct 21, 1999 at 02:00:16PM +1000, Herbert Xu wrote:
> The change was made in line with the SuS.  Note that it is not possible
> to write echo statements portably across platforms because of legacy
> shells that do support options.  That is why it is recommended to use
> printf instead of echo.

I'm afraid that I'm not familiar with the SuS.  Could you give me a URL
for this?

> > so, I guess I should start filing `bashism' bug-reports against scripts
> > which start out `#! /bin/sh' and make use of `echo -n' or `echo -e'?
> 
> Yes, options are not supported under the SuS.

Unfortunately, it seems to break kernel compiles (for 2.2.13, at
least), if /bin/sh -> /bin/bash.  Apparently some #define's are echo'd
to include/linux/compile.h, using the `-n' option.  You can get around
this by using `make SHELL=/bin/bash ...' if compiling it directly, but
I don't think that works if going through make-kpkg.


Reply to: