root /etc/csh

Jerry gesbbb at yahoo.com
Wed Nov 12 11:14:20 PST 2008


On Wed, 12 Nov 2008 08:06:16 +0100
Polytropon <freebsd at edvax.de> wrote:

>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.

I usually just use:

#!/usr/bin/env bash

It seems to work on both Linux and FBSD.

-- 
Jerry
gesbbb at yahoo.com

His life was formal; his actions seemed ruled with a ruler.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20081112/5ab27f87/signature.pgp


More information about the freebsd-questions mailing list