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

Re: [PATCH] latest ash has broken 'echo' command



Buddha Buck <bmbuck@zaphod.dhis.org> wrote:
>
>> Well the fact is that if ash has to support features that are not required
>> by POSIX (but are compatible with it), just where do you draw the line? Many
>> bashisms belong to this category.  Pretty soon ash will become bash.

> "Be liberal in what you accept, be conservative in what you generate".

> In the case of standards like POSIX /bin/sh, I think this general rule 
> of thumb means that implementations should try to support all the 
> common optional features, if possible, AND that /bin/sh scripts should 
> try to avoid using any optional features.

If we were discussing bash, I would totally agree.  But ash exists only
as to server as /bin/sh.  And that is only possible if people who wrote
#!/bin/sh scripts stuck to some standard.  Currecnt policy names POSIX,
and POSIX does not allow portable scripts to use options on echo because
it allows shells to not implement options.

BTW, many bashisms are actually POSIX compatible, like a lot of its string
parameter substitutions that aren't included in POSIX.  Does this mean that
someone should write the code for ash? No, that would be a bloat IMHO.

Indeed, if bash were POSIX compliant, it cannot possibly contain any bashisms
that aren't POSIX compatible, can it?
-- 
Debian GNU/Linux 2.1 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


Reply to: