Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh Punctuation nits, drop unnecessary .Pps, sort sections.
details: https://anonhg.NetBSD.org/src/rev/879ce531d175
branches: trunk
changeset: 519573:879ce531d175
user: wiz <wiz%NetBSD.org@localhost>
date: Thu Dec 20 20:07:40 2001 +0000
description:
Punctuation nits, drop unnecessary .Pps, sort sections.
diffstat:
bin/sh/sh.1 | 45 ++++++++++++++++++++-------------------------
1 files changed, 20 insertions(+), 25 deletions(-)
diffs (180 lines):
diff -r 1aadc055822c -r 879ce531d175 bin/sh/sh.1
--- a/bin/sh/sh.1 Thu Dec 20 20:07:24 2001 +0000
+++ b/bin/sh/sh.1 Thu Dec 20 20:07:40 2001 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: sh.1,v 1.43 2001/04/03 10:56:03 wiz Exp $
+.\" $NetBSD: sh.1,v 1.44 2001/12/20 20:07:40 wiz Exp $
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -400,7 +400,7 @@
.Bl -item -offset indent
.It
.Li [n]<< delimiter
-.Dl here-doc-text...
+.Dl here-doc-text ...
.Li delimiter
.El
.Pp
@@ -454,7 +454,6 @@
misleadingly and sporadically refer to a shell script without a magic
number as a "shell procedure".
.Ss Path Search
-.Pp
When locating a command, the shell first looks to see if it has a shell
function by that name. Then it looks for a builtin command by that name.
If a builtin command is not found, one of two things happen:
@@ -499,7 +498,6 @@
Unless otherwise stated, the exit status of a command is that of the last
simple command executed by the command.
.Ss Pipelines
-.Pp
A pipeline is a sequence of one or more commands separated
by the control operator |. The standard output of all but
the last command is connected to the standard input
@@ -601,7 +599,7 @@
.Pp
The syntax of the for command is
.Bd -literal -offset indent
-for variable in word...
+for variable in word ...
do list
done
.Ed
@@ -658,7 +656,6 @@
must follow a control operator (here,
.Dq \&; )
so that it is recognized as a reserved word and not as another command argument.
-.Pp
.Ss Functions
The syntax of a function definition is
.Pp
@@ -926,7 +923,6 @@
.Ev IFS
and quoting that is in effect.)
.Ss Arithmetic Expansion
-.Pp
Arithmetic expansion provides a mechanism for evaluating an arithmetic
expression and substituting its value. The format for arithmetic
expansion is as follows:
@@ -1003,7 +999,6 @@
.Dq \&! ,
if any). To include a minus sign, make it the first or last character listed
.Ss Builtins
-.Pp
This section lists the builtin commands which are builtin because they
need to perform some operation that can't be performed by a separate
process. In addition to these, there are several other commands that may
@@ -1036,7 +1031,7 @@
.It bg [ Ar job ] ...
Continue the specified jobs (or the current job if no
jobs are given) in the background.
-.It command Ar command Ar arg...
+.It command Ar command Ar arg ...
Execute the specified builtin command. (This is useful when you
have a shell function with the same name as a builtin command.)
.It cd Op Ar directory
@@ -1062,10 +1057,10 @@
that the user gave. These may be different either because the
.Ev CDPATH
mechanism was used or because a symbolic link was crossed.
-.It eval Ar string...
+.It eval Ar string ...
Concatenate all the arguments with spaces. Then re-parse and execute
the command.
-.It exec Op Ar command arg...
+.It exec Op Ar command arg ...
Unless command is omitted, the shell process is replaced with the
specified program (which must be a real program, not a shell builtin or
function). Any redirections on the
@@ -1078,7 +1073,7 @@
.Ar exitstatus
is given it is used as the exit status of the shell; otherwise the
exit status of the preceding command is used.
-.It export Ar name...
+.It export Ar name ...
.It export Fl p
The specified names are exported so that they will appear in the
environment of subsequent commands. The only way to un-export a variable
@@ -1274,7 +1269,7 @@
cmd \-carg -a file file
cmd \-a \-carg \-\- file file
.Ed
-.It hash Fl rv Ar command...
+.It hash Fl rv Ar command ...
The shell maintains a hash table which remembers the
locations of commands. With no arguments whatsoever,
the
@@ -1313,7 +1308,7 @@
will continue to print the old name for the directory.
.It Xo read Op Fl p Ar prompt
.Op Fl r
-.Op Ar variable...
+.Op Ar variable ...
.Xc
The prompt is printed if the
.Fl p
@@ -1338,7 +1333,7 @@
acts as an escape character, causing the following character to be treated
literally. If a backslash is followed by a newline, the backslash and the
newline will be deleted.
-.It readonly Ar name...
+.It readonly Ar name ...
.It readonly Fl p
The specified names are marked as read only, so that they cannot be
subsequently modified or unset. The shell allows the value of a variable
@@ -1355,7 +1350,7 @@
.It Xo set
.Oo {
.Fl options | Cm +options | Cm -- }
-.Oc Ar arg...
+.Oc Ar arg ...
.Xc
The
.Ic set
@@ -1406,7 +1401,7 @@
.Xc
.It Xo trap
.Op Ar action
-.Ar signal...
+.Ar signal ...
.Xc
Cause the shell to parse and execute action when any of the specified
signals are received. The signals are specified by signal number or as
@@ -1534,7 +1529,7 @@
is specified, the shell removes that alias. If
.Fl a
is specified, all aliases are removed.
-.It unset Ar name...
+.It unset Ar name ...
The specified variables and functions are unset and unexported. If a given
name corresponds to both a variable and a function, both the variable and
the function are unset.
@@ -1563,6 +1558,13 @@
will throw you into command VI command mode. Hitting
.Aq return
while in command mode will pass the line to the shell.
+.Sh EXIT STATUS
+Errors that are detected by the shell, such as a syntax error, will cause the
+shell to exit with a non-zero exit status. If the shell is not an
+interactive shell, the execution of the shell file will be aborted. Otherwise
+the shell will return the exit status of the last command executed, or
+if the exit builtin is used with a numeric argument, it will return the
+argument.
.Sh ENVIRONMENT
.Bl -tag -width MAILCHECK
.It Ev HOME
@@ -1638,13 +1640,6 @@
command appeared in
.At v1 .
It was, however, unmaintainable so we wrote this one.
-.Sh EXIT STATUS
-Errors that are detected by the shell, such as a syntax error, will cause the
-shell to exit with a non-zero exit status. If the shell is not an
-interactive shell, the execution of the shell file will be aborted. Otherwise
-the shell will return the exit status of the last command executed, or
-if the exit builtin is used with a numeric argument, it will return the
-argument.
.Sh BUGS
Setuid shell scripts should be avoided at all costs, as they are a
significant security risk.
Home |
Main Index |
Thread Index |
Old Index