why dash (rather than bash)

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

why dash (rather than bash)

Postby LoneStar on Wed Mar 02, 2011 7:54 pm

I guess the title says it all ...
Why oh why is 'sh' a link to 'dash' rather than 'bash'??
I've never ever had a problem with bash - its the default shell for all (as far as I know) linux distros and I _always_ start my scripts with '#!/bin/sh' - not that even that helps, if you do a 'sh myscripts.sh' it will be 'dash', no matter what ...
Admittedly, its not that much of a difference, the most glaring one being "echo -e" in bash which prepends any string with '-e' in dash *sigh*

Can anyone give me a really good reason for using 'dash' (other than it wouldn't otherwise be used)?
LoneStar
Level 1
Level 1
 
Posts: 22
Joined: Fri May 21, 2010 2:02 pm

Linux Mint is funded by ads and donations.
 

Re: why dash (rather than bash)

Postby JasonLG on Thu Mar 03, 2011 2:27 am

LoneStar wrote:I guess the title says it all ...
Why oh why is 'sh' a link to 'dash' rather than 'bash'??
I've never ever had a problem with bash - its the default shell for all (as far as I know) linux distros and I _always_ start my scripts with '#!/bin/sh' - not that even that helps, if you do a 'sh myscripts.sh' it will be 'dash', no matter what ...
Admittedly, its not that much of a difference, the most glaring one being "echo -e" in bash which prepends any string with '-e' in dash *sigh*

Can anyone give me a really good reason for using 'dash' (other than it wouldn't otherwise be used)?


From the package description of dash in synaptic...

"The Debian Almquist Shell (dash) is a POSIX-compliant shell derived
from ash.

Since it executes scripts faster than bash, and has fewer library
dependencies (making it more robust against software or hardware
failures), it is used as the default system shell on Debian systems."
"I see" said the blind man to the deaf man who stuck his wooden leg out the window to check the weather.
JasonLG
Level 7
Level 7
 
Posts: 1624
Joined: Thu May 20, 2010 9:15 pm
Location: Polk City, Iowa USA


Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 6 guests