Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2008 08:06:16 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Jerry McAllister <jerrymc@msu.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: root /etc/csh
Message-ID:  <20081112080616.2e195af5.freebsd@edvax.de>
In-Reply-To: <20081111151302.GA86528@gizmo.acns.msu.edu>
References:  <20081110110805.GK1302@obspm.fr> <20081110161002.GA81960@gizmo.acns.msu.edu> <20081110203643.GH27646@obspm.fr> <200811102235.46971.fbsd.questions@rachie.is-a-geek.net> <Pine.GSO.4.63.0811102239200.846@hmacs.cmi.ua.ac.be> <4ad871310811101530p7b2baa0fk7f7b5118e314c11d@mail.gmail.com> <4918CE42.3050504@ccstores.com> <20081111151302.GA86528@gizmo.acns.msu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 11 Nov 2008 10:13:02 -0500, Jerry McAllister <jerrymc@msu.edu> wrote:
> Probably is the main reason, though another is that some things
> may be written assuming a particular shell.  Not a good practice,
> but happens.

Especially in Linux, it's common to prefix scripts with #!/bin/bash
which won't work in FreeBSD, because it's #/usr/local/bin/bash there.
Linux has no problem running #!/bin/sh scripts because there's a
symlink /bin/sh -> /bin/bash.

My advice for maximum interoperability and compatibility between Linux
and UNIX: If you're not using any bash specific techniques in your
scripts, start them with #!/bin/sh instead of #!/bin/bash.

The sh shell is the UNIX standard scripting shell, while Linux's
one is bash.


-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081112080616.2e195af5.freebsd>