Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Masters Of The Universe (http://www.linux-archive.org/ubuntu-masters-universe/)
-   -   bash vs dash (http://www.linux-archive.org/ubuntu-masters-universe/136080-bash-vs-dash.html)

Jiafu Gao 08-01-2008 10:25 PM

bash vs dash
 
Hi,

I am trying to find out the feature differenece between bash and dash. The internet does not help much. man dash goes to manual page for sh. Is this information available at all?

Specifically, I like to know if dash support:
* 1) autocompletion (of command)
* 2) command history

Thanks for any help.

Jiafu



--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu

"John Dong" 08-03-2008 12:26 AM

bash vs dash
 
dash is a minimal shell that is primarily meant to meet POSIX bourne shell standards (i.e. BSD's /bin/sh). It doesn't support autocompletion or command history.

On Fri, Aug 1, 2008 at 6:25 PM, Jiafu Gao <jiafu_gao@yahoo.com> wrote:

Hi,


I am trying to find out the feature differenece between bash and dash. The internet does not help much. man dash goes to manual page for sh. Is this information available at all?

Specifically, I like to know if dash support:

* 1) autocompletion (of command)
* 2) command history

Thanks for any help.

Jiafu




--

Ubuntu-motu mailing list

Ubuntu-motu@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu




--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu

Jiafu Gao 08-04-2008 03:03 PM

bash vs dash
 
Thanks for the those who offered helps. I found the following link that is very helpful:
** http://en.wikipedia.org/wiki/Comparison_of_computer_shells
Note that there is only ash, not dash in the list. Since dash comes from ash, I assume the features for them are the same.

I really like the lightweightness of dash on PS3. However, I missed these features in bash (in order of importance):
* 1) command line editing
* 2) tab completion
* 3) command history
* 4) customized prompt

If we can get these features add to dash with minimal impact on its compactness, I will be a happy dash user, and I believe more users will be less dash-resistance.

As for 1), this is from the manual page:
** -V vi' Enable
the built-in vi(1) command line editor (disables -E if it has been set).

I am not sure it means for command line editing. Anyway, I could not get it work.

As for 4), dash actually has some limited support in the form of env variable PS1. I've written a small program (bashps - bash style prompt string) to make it possible to use bash style prompt (such as 'u@h:w$ ') in dash without any change to dash itself. Just run the following command:
>** export PS1 = "$(bashps 'u@h:w$ ')"

If any one has any "smart" idea to add 2), 3) to dash without change to dash or with minimal change (in term code size), I will be happy to hear.

Best regards,

Jiafu
**

----- Original Message ----
From: John Dong <jdong@ubuntu.com>
To: Jiafu Gao <jiafu_gao@yahoo.com>
Cc:
ubuntu-motu@lists.ubuntu.com
Sent: Saturday, August 2, 2008 8:26:05 PM
Subject: Re: bash vs dash

dash is a minimal shell that is primarily meant to meet POSIX bourne shell standards (i.e. BSD's /bin/sh). It doesn't support autocompletion or command history.

On Fri, Aug 1, 2008 at 6:25 PM, Jiafu Gao <jiafu_gao@yahoo.com> wrote:
Hi,

I am trying to find out the feature differenece between bash and dash. The internet does not help much. man dash goes to manual page for sh. Is this information available at all?

Specifically, I like to
know if dash support:

* 1) autocompletion (of command)
* 2) command history

Thanks for any help.

Jiafu


--

Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu





--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu

Reinhard Tartler 08-04-2008 04:44 PM

bash vs dash
 
Jiafu Gao <jiafu_gao@yahoo.com> writes:

> I really like the lightweightness of dash on PS3. However, I missed these
> features in bash (in order of importance):
> 1) command line editing
> 2) tab completion
> 3) command history
> 4) customized prompt

how about installing both, and use dash for non-interactive purposes and
bash for interactive sessions? at least that's the default in ubuntu.

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu


All times are GMT. The time now is 05:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.