[sf-lug] > and >> and < and << and |
jim
jim at well.com
Mon Aug 8 21:05:13 PDT 2016
$ echo $SHLVL
1
$ which dash
/bin/dash
$ dash
$ echo $SHLVL
2
$
## the SHLVL environment variable has an integer
## that reflects the current parent-child level
## of the shell in which one invokes the command.
## the prompt does not reveal exactly what shell
## is running, although the $ prompt lets us
## assume its a Bourne family shell.
## The dash command (the which command searches
## the PATH environment variable value and
## verifies that dash is invokable). The value
## of the SHLVL environment variable shows the
## current shell has a parent.
My first reason for using the dash shell is
its man page, which is crystal clear and a great
way for someone to learn how to use any shell.
The man page is clear partly because the design
of the dash shell is simple, no kitchen sinks.
The dash shell features are all I need,
the exotic features of the bash shell give me
a headache, so why use that elephant gun to
shoot my jack rabbits. Much smaller memory
requirement, pretty much bug free, with docs
that I can readily peruse all the times I forget
stuff.
On 08/09/2016 01:29 AM, Alex Kleider wrote:
> On 2016-08-08 10:32, jim wrote:
>
>> (The DASH man page is glorious, unlike some other
>> man pages.)
>
> I've noticed that some small (SoC) systems come with dash rather than
> bash and assumed that the former was a 'smaller' version of the latter
> and was surprised that my system (current LTS of Ubuntu) seems to have
> both installed.
> $ man DASH # man page
> $ man dash # same man page
> $ man bash # different structure but I find no differences in
> behaviour described.
> $ dash # => a '$' prompt by itself; I'm in another shell, dash this time.
> $ DASH
> DASH: command not found
> $ bash # a pause and then the same prompt returns; I'm in another shell.
>
> interesting.
> Under what circumstances would someone with both installed wish to use
> dash rather than bash?
>
> Alex
>
More information about the sf-lug
mailing list