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

Re: Shell script or Perl?



On Thu, Jun 12, 2003 at 07:19:27PM +0200, Sebastian Kapfer wrote:
> On Thu, 12 Jun 2003 17:50:12 +0200, Gregory Seidman wrote:
> > Let me add one more detail: anyone who is about to write a shell script
> > should read this page http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
> > Some of it is outdated, but the majority of it still applies. The short
> > version: scripts should use /bin/sh.
> 
> BTW, is #!/bin/bash a valid choice for a Debian "official" shell script?
> (e.g. an init.d script of a .deb package)  Sometimes those bash-isms are
> sooo practical :-)  After all, bash is an essential package AFAIK.

It's valid, yes. I always prefer /bin/sh where possible (and it usually
is), though; this allows people to switch in a smaller and lighter shell
like dash if they want.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: