Date: Sun, 31 Oct 2010 23:03:12 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r214609 - head/bin/sh Message-ID: <201010312303.o9VN3Ch1011419@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun Oct 31 23:03:11 2010 New Revision: 214609 URL: http://svn.freebsd.org/changeset/base/214609 Log: 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 Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sun Oct 31 22:59:49 2010 (r214608) +++ head/bin/sh/sh.1 Sun Oct 31 23:03:11 2010 (r214609) @@ -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 .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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010312303.o9VN3Ch1011419>