Rewrap minimal-sh
Translators may ignore PR: 174029 Submitted by: Derek Wood <ddwood@highdensity.org> Approved by: bcr (mentor)
This commit is contained in:
parent
fea381ec1f
commit
bab98b75e1
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=40297
1 changed files with 18 additions and 17 deletions
|
@ -3980,33 +3980,34 @@ kern.timecounter.hardware: TSC -> i8254</screen>
|
|||
|
||||
<qandaentry>
|
||||
<question id="minimal-sh">
|
||||
<para>Why is <command>/bin/sh</command> so minimal? Why does
|
||||
&os; not use <command>bash</command> or another
|
||||
<para>Why is <command>/bin/sh</command> so minimal? Why
|
||||
does &os; not use <command>bash</command> or another
|
||||
shell?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Many people need to write
|
||||
shell scripts which will be portable across many systems.
|
||||
That is why &posix; specifies the shell and utility commands
|
||||
in great detail. Most scripts are written in Bourne shell (&man.sh.1;),
|
||||
and because several important programming interfaces
|
||||
(&man.make.1;, &man.system.3;, &man.popen.3;, and analogues
|
||||
in higher-level scripting languages like Perl and Tcl) are
|
||||
specified to use the Bourne shell to interpret commands.
|
||||
Because the Bourne shell is so often and widely used, it is
|
||||
important for it to be quick to start, be deterministic in
|
||||
its behavior, and have a small memory footprint.</para>
|
||||
<para>Many people need to write shell scripts which will be
|
||||
portable across many systems. That is why &posix;
|
||||
specifies the shell and utility commands in great detail.
|
||||
Most scripts are written in Bourne shell (&man.sh.1;), and
|
||||
because several important programming interfaces
|
||||
(&man.make.1;, &man.system.3;, &man.popen.3;, and
|
||||
analogues in higher-level scripting languages like Perl
|
||||
and Tcl) are specified to use the Bourne shell to
|
||||
interpret commands. Because the Bourne shell is so often
|
||||
and widely used, it is important for it to be quick to
|
||||
start, be deterministic in its behavior, and have a small
|
||||
memory footprint.</para>
|
||||
|
||||
<para>The existing implementation is our best effort at
|
||||
meeting as many of these requirements simultaneously as we
|
||||
can. In order to keep <command>/bin/sh</command> small, we
|
||||
have not provided many of the convenience features that
|
||||
can. In order to keep <command>/bin/sh</command> small,
|
||||
we have not provided many of the convenience features that
|
||||
other shells have. That is why the Ports Collection
|
||||
includes more featureful shells like
|
||||
<command>bash</command>, <command>scsh</command>,
|
||||
&man.tcsh.1;, and <command>zsh</command>. (You
|
||||
can compare for yourself the memory utilization of all these
|
||||
&man.tcsh.1;, and <command>zsh</command>. (You can
|
||||
compare for yourself the memory utilization of all these
|
||||
shells by looking at the <quote>VSZ</quote> and
|
||||
<quote>RSS</quote> columns in a <command>ps
|
||||
<option>-u</option></command> listing.)</para>
|
||||
|
|
Loading…
Reference in a new issue