Jump to content

Debian Almquist shell: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Intro: rw - it's not a problem with the shell, but it is that the scripts are not being honest about what they need
Ximaera (talk | contribs)
No edit summary
Line 13: Line 13:
* a testing environment for shell scripts to verify their compatibility with POSIX syntax.
* a testing environment for shell scripts to verify their compatibility with POSIX syntax.


dash is a modern replacement for [[Almquist Shell|ash]] in the [[Debian]] project, and (as of the 6.10 release) is the default /bin/sh in [[Ubuntu (Linux distribution)|Ubuntu]]. However, the transition in Ubuntu to making dash /bin/sh has broken numerous shell scripts that relied upon Bash-specific functionality, also known as [[Bashism]]s.[https://bugs.launchpad.net/ubuntu/+source/dash/+bug/61463] [https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481] To avoid this problem, scripts should explicitly declare their use of Bashisms with the line:
dash is a modern replacement for [[Almquist Shell|ash]] in the [[Debian]] project (and is expected to be the default /bin/sh for [[Debian|Debian Lenny]] release<ref>[http://release.debian.org/lenny/goals.txt Release goals for Debian Lenny]</ref>). Since the 6.10 release, dash is also the default /bin/sh in [[Ubuntu (Linux distribution)|Ubuntu]]<ref>[https://wiki.ubuntu.com/DashAsBinSh Dash as /bin/sh in Ubuntu 6.10]</ref>. However, the transition in Ubuntu to making dash /bin/sh has broken numerous shell scripts that relied upon Bash-specific functionality, also known as [[Bashism]]s.<ref>[https://bugs.launchpad.net/ubuntu/+source/dash/+bug/61463 Ubuntu bug #61463: script that are using bash could be broken with the new symlink]</ref> <ref>[https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481 Ubuntu bug #141481: dash as #!/bin/sh introduces countless incompatibilities]</ref> To avoid this problem, scripts should explicitly declare their use of Bashisms with the line:
#!/bin/bash
#!/bin/bash


== Sources ==
== Sources ==
* [http://gondor.apana.org.au/~herbert/dash/ dash home]
* [http://gondor.apana.org.au/~herbert/dash/ dash home]
* [http://packages.debian.org/unstable/shells/dash Debian package overview]
* [http://packages.debian.org/etch/dash Debian package overview]
* [https://launchpad.net/distros/ubuntu/+spec/dash-as-bin-sh Ubuntu feature specification: Dash as /bin/sh]
* [https://launchpad.net/distros/ubuntu/+spec/dash-as-bin-sh Ubuntu feature specification: Dash as /bin/sh]

== Notes ==

{{reflist|3}}


{{Debian}}
{{Debian}}

Revision as of 09:49, 5 February 2008

Debian Almquist shell (dash) is a POSIX-compliant Unix shell, much smaller than bash. It requires less disk space but is also less feature rich.

dash is a direct descendant of the NetBSD version of the Almquist Shell (ash). It was ported to Linux by Herbert Xu in early 1997. It was renamed to dash in 2002.

dash executes scripts faster than bash and depends on fewer libraries. It is believed to be more reliable in case of upgrade problems or disk failures.

dash may be used as:

  • shell on the installation floppy disks.
  • root user shell.
  • /bin/sh replacement.
  • a testing environment for shell scripts to verify their compatibility with POSIX syntax.

dash is a modern replacement for ash in the Debian project (and is expected to be the default /bin/sh for Debian Lenny release[1]). Since the 6.10 release, dash is also the default /bin/sh in Ubuntu[2]. However, the transition in Ubuntu to making dash /bin/sh has broken numerous shell scripts that relied upon Bash-specific functionality, also known as Bashisms.[3] [4] To avoid this problem, scripts should explicitly declare their use of Bashisms with the line:

#!/bin/bash

Sources

Notes