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

Re: What to do about bashisms?



> On Mon, Aug 09, 1999 at 09:16:40PM +0200, Piotr Roszatycki wrote:
> > > My suggestion:
> > > lintian could report:
> > > * usage 'source' (correct is '.')
> > > * usage 'echo -e' (AFAIR ash doesn't support it)
> 
> Marcelo E. Magallon <mmagallo@efis.ucr.ac.cr> wrote:
> > /bin/echo does.
> > 
> > $ /bin/echo -e 'This\tis\tnot\ta\tbashism'
> > This    is      not     a       bashism
> 
> This issue is not ash vs. bashisms -- the issue is whether
> the constructions are POSIX.

echo is not part of a POSIX shell, apparently, so the semantics of the
echo command are irrelevant for determining whether /bin/sh or
/bin/bash should be used.  Incidentally, the UNIX98 specifications for
echo state that echo does not recognise *any* options, and that printf
should be used instead in new applications.

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
        Debian GNU/Linux Developer,  see http://www.debian.org/~jdg


Reply to: