svn commit: r214945 - stable/7/bin/sh

Jilles Tjoelker jilles at
Sun Nov 7 20:33:37 UTC 2010

Author: jilles
Date: Sun Nov  7 20:33:36 2010
New Revision: 214945

  MFC r214609: sh(1): Correct synopsis and make precise how $0 is set.
  In particular, the extra argument to set $0 with -c was not documented.

Directory Properties:
  stable/7/bin/sh/   (props changed)

Modified: stable/7/bin/sh/sh.1
--- stable/7/bin/sh/sh.1	Sun Nov  7 20:29:39 2010	(r214944)
+++ stable/7/bin/sh/sh.1	Sun Nov  7 20:33:36 2010	(r214945)
@@ -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
@@ -40,9 +40,24 @@
 .Nd command interpreter (shell)
-.Op Fl /+abCEefIimnPpsTuVvx
+.Op Fl /+abCEefIimnPpTuVvx
 .Op Fl /+o Ar longname
-.Op Fl c Ar string
+.Ar script
+.Op Ar arg ...
+.Op Fl /+abCEefIimnPpTuVvx
+.Op Fl /+o Ar longname
+.Fl c Ar string
+.Ar name
+.Op Ar arg ...
+.Op Fl /+abCEefIimnPpTuVvx
+.Op Fl /+o Ar longname
+.Fl s
 .Op Ar arg ...
@@ -1099,7 +1114,12 @@ For a
 pipeline, the process ID is that of the last command in the
 .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,
+.Ar name
+operand if given (with
+.Fl c )
+or otherwise argument 0 passed to the shell.
 .Ss Word Expansions
 This clause describes the various expansions that are

More information about the svn-src-stable-7 mailing list