[http://en.wikipedia.org/wiki/Debian_Almquist_shell Dash] is a minimalist POSIX-complient shell. It can be much faster than Bash, and takes up less memory when in use. Most POSIX compliant scripts specify {{filename|/bin/sh}} at the first line of the script, which means it will run {{filename|/bin/sh}} as the shell, which by default in Arch is a symlink to {{filename|/bin/bash}}.

+

[http://en.wikipedia.org/wiki/Debian_Almquist_shell Dash] is a minimalist POSIX-complient shell. It can be much faster than Bash, and takes up less memory when in use. Most POSIX compliant scripts specify {{ic|/bin/sh}} at the first line of the script, which means it will run {{ic|/bin/sh}} as the shell, which by default in Arch is a symlink to {{ic|/bin/bash}}.

−

You can re-symlink {{filename|/bin/sh}} to {{filename|/bin/dash}}, which can increase system performance, but first you must verify that none of the scripts that aren't explicitly #!/bin/bash scripts are safely POSIX compliant and do not require any of Bash's features.

+

You can re-symlink {{ic|/bin/sh}} to {{ic|/bin/dash}}, which can increase system performance, but first you must verify that none of the scripts that aren't explicitly #!/bin/bash scripts are safely POSIX compliant and do not require any of Bash's features.

−

This article is for those who want to help [[dash]] become the new {{filename|/bin/sh}}.

+

This article is for those who want to help [[dash]] become the new {{ic|/bin/sh}}.

From http://article.gmane.org/gmane.linux.arch.devel/11418:

From http://article.gmane.org/gmane.linux.arch.devel/11418:

Line 18:

Line 18:

==Identifying bashisms==

==Identifying bashisms==

−

Features of bash that aren't included in Dash ('bashisms') will not work without being explicitly pointed to {{filename|/bin/bash}}. The following instructions will allow you to find any scripts that may need modification.

+

Features of bash that aren't included in Dash ('bashisms') will not work without being explicitly pointed to {{ic|/bin/bash}}. The following instructions will allow you to find any scripts that may need modification.

Install {{package AUR|checkbashisms}} from the [[AUR]].

Install {{package AUR|checkbashisms}} from the [[AUR]].

Line 43:

Line 43:

==Relinking /bin/sh==

==Relinking /bin/sh==

−

Once you have verified that it won't break any functionality, it should be safe to relink {{filename|/bin/sh}}. To do so use the following command (as root):

+

Once you have verified that it won't break any functionality, it should be safe to relink {{ic|/bin/sh}}. To do so use the following command (as root):

ln -sfT /bin/dash /bin/sh

ln -sfT /bin/dash /bin/sh

Line 49:

Line 49:

==Initscript status==

==Initscript status==

−

* The FD checks with {{Ic|test -t}} in {{filename|/etc/rc.d/functions}} do not work correctly with dash, breaking colored output as a result. See http://bugs.archlinux.org/task/19551?project=1&order=id&sort=desc (the patch does not address this issue in particular).

+

* The FD checks with {{Ic|test -t}} in {{ic|/etc/rc.d/functions}} do not work correctly with dash, breaking colored output as a result. See http://bugs.archlinux.org/task/19551?project=1&order=id&sort=desc (the patch does not address this issue in particular).

:* Try using {{Ic|test(1)}} instead of the dash builtin?

:* Try using {{Ic|test(1)}} instead of the dash builtin?

:* Is the problem specific to calls involving {{Ic|init(1)}}?

:* Is the problem specific to calls involving {{Ic|init(1)}}?

Revision as of 11:58, 13 February 2012

This article or section needs expansion.

Reason:please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Dash as /bin/sh#)

The factual accuracy of this article or section is disputed.

Reason:please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Dash as /bin/sh#)

Dash is a minimalist POSIX-complient shell. It can be much faster than Bash, and takes up less memory when in use. Most POSIX compliant scripts specify /bin/sh at the first line of the script, which means it will run /bin/sh as the shell, which by default in Arch is a symlink to /bin/bash.

You can re-symlink /bin/sh to /bin/dash, which can increase system performance, but first you must verify that none of the scripts that aren't explicitly #!/bin/bash scripts are safely POSIX compliant and do not require any of Bash's features.

This article is for those who want to help dash become the new /bin/sh.

Contents

Identifying bashisms

Features of bash that aren't included in Dash ('bashisms') will not work without being explicitly pointed to /bin/bash. The following instructions will allow you to find any scripts that may need modification.