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

Re: Policy Weekly Issue #4/1: Bash vs Bourne shell



Santiago Vila Doncel <sanvila@unex.es> writes:

> On Thu, 23 Oct 1997, Christian Schwarz wrote:
> 
> >      ``The shell `/bin/sh' may be symbolic link to any POSIX compatible
> >      shell. If a script uses non-POSIX features the appropriate shell
> >      has to be specified in the first line of the script (i.e.
> >      `#!/bin/bash') and the package has to depend on the package
> >      providing the shell (unless the shell package is marked
> >      `Essential').''
> 
> This is ok, but I would object if it simply stops there. I think
> something like the following would have to be added: ``For portability
> reasons, you must use POSIX syntax wherever possible.''

Yes, you wrote the admonition without the encouragement.  To elaborate
on Santiago's addition:

  Restrict your script to POSIX features when possible so that it may
  use /bin/sh as its interpreter.  If your script works with ash, it's
  probably POSIX compliant, but if you are in doubt, use /bin/bash.


Guy


Reply to: