diff options
author | jilles <jilles@FreeBSD.org> | 2010-10-31 23:03:11 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-10-31 23:03:11 +0000 |
commit | 26a6f9d45c2842cb22dab8775fdf61335ca283e3 (patch) | |
tree | bd22512c1e43028ca29d55d56aa1535a9d6237d6 /bin | |
parent | af2e843bec771266303a24c34aad0dad43e4cf38 (diff) | |
download | FreeBSD-src-26a6f9d45c2842cb22dab8775fdf61335ca283e3.zip FreeBSD-src-26a6f9d45c2842cb22dab8775fdf61335ca283e3.tar.gz |
sh(1): Correct synopsis and make precise how $0 is set.
In particular, the extra argument to set $0 with -c was not documented.
MFC after: 1 week
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/sh.1 | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 3499969..d529692 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd October 16, 2010 +.Dd October 31, 2010 .Dt SH 1 .Os .Sh NAME @@ -40,9 +40,24 @@ .Nd command interpreter (shell) .Sh SYNOPSIS .Nm -.Op Fl /+abCEefIimnPpsTuVvx +.Op Fl /+abCEefIimnPpTuVvx .Op Fl /+o Ar longname -.Op Fl c Ar string +.Oo +.Ar script +.Op Ar arg ... +.Oc +.Nm +.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+o Ar longname +.Fl c Ar string +.Oo +.Ar name +.Op Ar arg ... +.Oc +.Nm +.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+o Ar longname +.Fl s .Op Ar arg ... .Sh DESCRIPTION The @@ -1109,7 +1124,12 @@ the process ID and its exit status until the .Ic wait built-in command reports completion of the process. .It Li $0 -(zero) Expands to the name of the shell or shell script. +(zero) Expands to the name of the shell script if passed on the command line, +the +.Ar name +operand if given (with +.Fl c ) +or otherwise argument 0 passed to the shell. .El .Ss Special Variables The following variables are set by the shell or |