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

Re: POSIX shell; bash ash pdksh & /bin/sh



On Mon, Aug 03, 1998 at 09:10:21PM -0400, Raul Miller wrote:
> Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> wrote:
> > Could somebody make a grep for "!/bin/bash" on his system?
> 
> You'll get a more accurate picture of the problem by running file on
> the binaries and grep for Bourne.

Huh?

From: /usr/share/misc/magic:

# commands:  file(1) magic for various shells and interpreters
#
0       string          :\ shell archive or commands for antique kernel text
0       string          #!/bin/sh               Bourne shell script text
0       string          #!\ /bin/sh             Bourne shell script text
0       string          #!\     /bin/sh         Bourne shell script text

# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
0       string          #!/bin/bash     Bourne-Again shell script text
0       string          #!\ /bin/bash   Bourne-Again shell script text
0       string          #!\     /bin/bash       Bourne-Again shell script text
0       string          #!/usr/local/bin/bash   Bourne-Again shell script text
0       string          #!\ /usr/local/bin/bash Bourne-Again shell script text
0       string          #!\     /usr/local/bin/bash     Bourne-Again shell script text
 
So you better check for Borne-Again.

> However, checking a limited set of directories on one of my systems
> (which has 521 packages installed) revealed 46 bash scripts that know
> that they're bash scripts.

Well, and I already posted some examples where it is absolutely unnecessary.
So shell scripting seems not to be reason enough to enforce bash (with
limited exceptions granted).

Manoj, can you think of other problems besides improper use of shell scripts?

Marcus

-- 
"Rhubarb is no Egyptian god."        Debian GNU/Linux        finger brinkmd@ 
Marcus Brinkmann                   http://www.debian.org    master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09


--  
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: