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

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



On Sun, Oct 24, 1999 at 12:09:58PM -0400, Raul Miller wrote:
> 
> Anyways, if you have text that is supposed to be a final standard and it
> says something other than echo's support for \ or -n is implementation
> defined, could you quote that fragment and indicate what the standard
> is?

Well, the current standard says that -e is forbidden, escape codes are
optional, and -n is implementation defined.  That means a compliant script
must not use any of those.  I know I made another mistake with escape codes,
but that doesn't change my argument.

> > A POSIX compliant script certainly can use escape codes. But it must
> > not rely on -n. A POSIX compliant shell must support escape codes, and
> > may or may not do -n.
> 
> Quote please.

Correction, escape codes are forbidden in a portable script as it currently
stands.

> > Remember very few people outside Debian actually uses ash, that means
> > the only shell they've got is bash. So it's not surprising to see them
> > exploit its features. Case in point, the kernel source have long used
> > bashisms like type, {} expansion, and other things. That certainly
> > didn't mean ash had to do those.
> 
> That was before we fixed up debian enough so that people could use ash
> as /bin/sh.

Exactly, remember how we fixed it up? By following POSIX.

> > But if ash is not /bin/sh, what is it supposed to do? Remember that no
> > one actually writes #!/bin/ash scripts.
> 
> Exactly my point.

Glad we agree.

> > So I guess what you are saying is that you'd be in favour of chaning
> > our policy so that #!/bin/sh scripts do not have to be POSIX
> > compliant. Well, in that case, I've got nothing more too say.
> 
> I'm saying it's a valid option, given the current situation.  I don't
> know that it's the best option.  But at this point I think we both
> understand the basic issues and the only thing up in the air is: what
> does the standards text really say?

OK, so let me summarise.

* -n, -e, escape codes are forbidden by the current POSIX standard in
  *scripts*.
* We can either fix all our scripts wrt POSIX or we can change the policy to
  include an exception for echo.  Or we can get rid of POSIX compliance
  altogether.
-- 
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: