sh(1) patch
Alfred Perlstein
alfred at freebsd.org
Sat Oct 30 08:56:21 UTC 2004
I always find it kind of difficult to find the $foo special operators
under the manpage for sh(1) because they are not listed in a way
that allows easy search.
Would this patch be acceptable?
Index: sh.1
===================================================================
RCS file: /home/ncvs/src/bin/sh/sh.1,v
retrieving revision 1.92
diff -u -r1.92 sh.1
--- sh.1 3 Jul 2004 02:03:44 -0000 1.92
+++ sh.1 30 Oct 2004 08:54:52 -0000
@@ -952,7 +952,7 @@
The value of the parameter is listed
next to its character.
.Bl -hang
-.It Li *
+.It Li $*
Expands to the positional parameters, starting from one.
When
the expansion occurs within a double-quoted string
@@ -965,7 +965,7 @@
if
.Ev IFS
is unset.
-.It Li @
+.It Li $@
Expands to the positional parameters, starting from one.
When
the expansion occurs within double-quotes, each positional
@@ -988,26 +988,26 @@
.Bd -literal -offset indent
"abc" "def ghi"
.Ed
-.It Li #
+.It Li $#
Expands to the number of positional parameters.
-.It Li \&?
+.It Li $\&?
Expands to the exit status of the most recent pipeline.
-.It Li -
+.It Li $-
(hyphen) Expands to the current option flags (the single-letter
option names concatenated into a string) as specified on
invocation, by the set built-in command, or implicitly
by the shell.
-.It Li $
+.It Li $$
Expands to the process ID of the invoked shell.
A subshell
retains the same value of $ as its parent.
-.It Li \&!
+.It Li $\&!
Expands to the process ID of the most recent background
command executed from the current shell.
For a
pipeline, the process ID is that of the last command in the
pipeline.
-.It Li 0
+.It Li $0
(zero) Expands to the name of the shell or shell script.
.El
.Ss Word Expansions
More information about the freebsd-doc
mailing list