Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2000 11:07:09 +0200 (MET DST)
From:      Mikael Hybsch <mhybsch@rsasecurity.com>
To:        freebsd-arch@freebsd.org
Subject:   Re: Shells 
Message-ID:  <Pine.GSO.4.21.0004181023310.19843-100000@spirit.dynas.se>
In-Reply-To: <27309.955883220@zippy.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 16 Apr 2000, Jordan K. Hubbard wrote:

> > What does this mean.  If it means that sh scripts won't run on BASH,
> 
> sh scripts run fine on bash and I'll certainly challenge anyone to
> find me a /bin/sh script which behaves differently when fed to our
> 5.0-current ash shell vs bash 2.03.
> 

That's easy. Below is a /bin/sh line from a product of ours that works
on AIX, HP/UX, Solaris and FreeBSD. It does however not work unmodified
on Linux. Bash happily aborts the script and complains that UID is
a read-only variable :(

UID=`id | sed 's/^uid=\([0-9]*\).*/\1/'`


If there is a need to have a nice command line interpreter in the source
tree it should be installed as /usr/bin/bash (or preferable /usr/bin/zsh).
/bin/sh is mainly for scripts.


-- 
 Mikael Hybsch                        Email: mhybsch@rsasecurity.com
 RSA Security AB                      Phone: +46-8-7250900
 Box 10704			      Fax:   +46-8-6494970
 S-121 29 STOCKHOLM, SWEDEN







To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0004181023310.19843-100000>