From owner-freebsd-doc@FreeBSD.ORG Sat Oct 30 08:56:21 2004 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C86516A4CE; Sat, 30 Oct 2004 08:56:21 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65A7D43D46; Sat, 30 Oct 2004 08:56:21 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 57D915CEB2; Sat, 30 Oct 2004 01:56:21 -0700 (PDT) Date: Sat, 30 Oct 2004 01:56:21 -0700 From: Alfred Perlstein To: tjr@freebsd.org, ru@freebsd.org Message-ID: <20041030085621.GZ24892@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i cc: doc@freebsd.org Subject: sh(1) patch X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2004 08:56:21 -0000 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