bash vs dash (was: Re: How can I display a list of current environment variables and also recognized regular expressions....)

Karl Auer kauer at
Thu May 1 23:11:30 UTC 2008

On Thu, 2008-05-01 at 18:51 -0400, John Toliver wrote:
> Thanks all.  Found exactly what I'm looking for.  It's a .pdf:
> "Bash-Beginners-Guide" which has a table of these.  I was right, they
> are called regular expressions.

There is a very useful document here called the "Advanced Bash-Scripting

You should always be aware of two things when scripting in Ubuntu:

The first is that Ubuntu does NOT use bash for system scripting, it uses
dash, which is missing some of bash's more esoteric features. If you
look at /bin/sh you will see that it is a link to /bin/dash, so you will
get dash, NOT bash, if you put "#!/bin/sh" at the top of your scripts.

The second is that bash does have quite a few extensions ("bashisms")
which will not work except with bash.


Googling for "ubunto bash dash" will get you lots of other information
and comment on this Ubuntu design choice.

Regards, K.

Karl Auer (kauer at                   +61-2-64957160 (h)                  +61-428-957160 (mob)

GPG fingerprint: DD23 0DF3 2260 3060 7FEC 5CA8 1AF6 D9E3 CFEE 6B28
Public key at  :

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ubuntu-users mailing list