Markup fixes (partly from uwe@) and change some tabs to spaces, they

seem to work better...
This commit is contained in:
kre 2018-03-16 12:06:18 +00:00
parent f993985a6e
commit 1b14ecae60
1 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: sh.1,v 1.195 2018/03/16 11:53:57 kre Exp $ .\" $NetBSD: sh.1,v 1.196 2018/03/16 12:06:18 kre Exp $
.\" Copyright (c) 1991, 1993 .\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
.\" .\"
@ -286,11 +286,11 @@ Read commands from the
.Ar command_string .Ar command_string
operand instead of, or in addition to, from the standard input. operand instead of, or in addition to, from the standard input.
Special parameter Special parameter
.Dv 0 \" $0 .Dv 0 \" $0 (comments like this for searching sources only)
will be set from the will be set from the
.Ar command_name .Ar command_name
operand if given, and the positional parameters operand if given, and the positional parameters
.Li ( 1 , 2 , .Dv ( 1 , 2 ,
etc.) etc.)
set from the remaining argument operands, if any. set from the remaining argument operands, if any.
.Fl c .Fl c
@ -1005,7 +1005,7 @@ They each are executed in a different way.
.Pp .Pp
When a shell function is executed, all of the shell positional parameters When a shell function is executed, all of the shell positional parameters
(note: excluding (note: excluding
.Li 0 , \" $0 .Li 0 , \" $0
which is a special, not positional, parameter, and remains unchanged) which is a special, not positional, parameter, and remains unchanged)
are set to the arguments of the shell function. are set to the arguments of the shell function.
The variables which are explicitly placed in the environment of The variables which are explicitly placed in the environment of
@ -1593,7 +1593,7 @@ Without the braces, a digit following
.Dq $ .Dq $
can only refer to one of the first 9 positional parameters, can only refer to one of the first 9 positional parameters,
or the special parameter or the special parameter
.Dv 0 . \" $0 .Dv 0 . \" $0
The word The word
.Dq Li $10 .Dq Li $10
is treated identically to is treated identically to
@ -1618,7 +1618,7 @@ variable, or by a
if if
.Ev IFS .Ev IFS
is unset. is unset.
.It Dv @ \" $@ .It Dv @ \" $@
Expands to the positional parameters, starting from one. Expands to the positional parameters, starting from one.
When the expansion occurs within double quotes, each positional When the expansion occurs within double quotes, each positional
parameter expands as a separate argument. parameter expands as a separate argument.
@ -1667,7 +1667,7 @@ will be unset.
Once set, the value of Once set, the value of
.Dq Dv \&! .Dq Dv \&!
will be retained until another background command is started. will be retained until another background command is started.
.It Dv 0 No (zero) \" $0 .It Dv 0 No (zero) \" $0
Expands to the name of the shell or shell script. Expands to the name of the shell or shell script.
.El .El
.\" .\"
@ -1684,7 +1684,7 @@ It is only field splitting or pathname expansion that can
create multiple fields from a single word. create multiple fields from a single word.
The single exception to this The single exception to this
rule is the expansion of the special parameter rule is the expansion of the special parameter
.Dv @ \" $@ .Dv @ \" $@
within double quotes, as was described above. within double quotes, as was described above.
.Pp .Pp
The order of word expansion is: The order of word expansion is:
@ -1765,7 +1765,7 @@ pathname expansion is not performed on the results of the expansion;
.It .It
field splitting is not performed on the results of the field splitting is not performed on the results of the
expansion, with the exception of the special rules for expansion, with the exception of the special rules for
.Dv @ . \" $@ .Dv @ . \" $@
.El .El
.Pp .Pp
In addition, a parameter expansion where braces are used, In addition, a parameter expansion where braces are used,
@ -1839,7 +1839,7 @@ rather than regular expression notation, is used to evaluate the patterns.
If parameter is If parameter is
.Dv * .Dv *
or or
.Dv @ , \" $@ .Dv @ , \" $@
the result of the expansion is unspecified. the result of the expansion is unspecified.
Enclosing the full parameter expansion string in double quotes does not Enclosing the full parameter expansion string in double quotes does not
cause the following four varieties of pattern characters to be quoted, cause the following four varieties of pattern characters to be quoted,
@ -2877,15 +2877,15 @@ command has run, the values and attributes of the variables might
be altered, and later, when the function completes, be restored. be altered, and later, when the function completes, be restored.
.Pp .Pp
Note that the positional parameters Note that the positional parameters
.Li 1 , \" $1 .Dv 1 , \" $1
.Li 2 , \" $2 .Dv 2 , \" $2
\&... (see \&... (see
.Sx Positional Parameters ) , .Sx Positional Parameters ) ,
and the special parameters and the special parameters
.Li \&# , \" $# .Dv \&# , \" $#
.Li \&* \" $* .Dv \&* \" $*
and and
.Li \&@ \" $@ .Dv \&@ \" $@
(see (see
.Sx Special Parameters ) , .Sx Special Parameters ) ,
are always made local in all functions, and are reset inside the are always made local in all functions, and are reset inside the
@ -3172,7 +3172,7 @@ The signals are specified by signal number or as the name of the signal.
If If
.Ar signal .Ar signal
is is
.Li 0 \" $0 .Li 0 \" $0
or its equivalent, or its equivalent,
.Li EXIT , .Li EXIT ,
the action is executed when the shell exits. the action is executed when the shell exits.