From owner-svn-src-all@FreeBSD.ORG Fri Jun 24 20:23:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FEB81065674; Fri, 24 Jun 2011 20:23:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 001348FC08; Fri, 24 Jun 2011 20:23:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5OKNo9l069130; Fri, 24 Jun 2011 20:23:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5OKNo9g069128; Fri, 24 Jun 2011 20:23:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201106242023.p5OKNo9g069128@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 24 Jun 2011 20:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223517 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2011 20:23:51 -0000 Author: jilles Date: Fri Jun 24 20:23:50 2011 New Revision: 223517 URL: http://svn.freebsd.org/changeset/base/223517 Log: sh(1): Document the case command better. Suggested by: netchild Reviewed by: gjb Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Fri Jun 24 20:15:44 2011 (r223516) +++ head/bin/sh/sh.1 Fri Jun 24 20:23:50 2011 (r223517) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 18, 2011 +.Dd June 24, 2011 .Dt SH 1 .Os .Sh NAME @@ -994,11 +994,22 @@ described later), separated by .Ql \&| characters. +Tilde expansion, parameter expansion, command substitution, +arithmetic expansion and quote removal are applied to the word. +Then, each pattern is expanded in turn using tilde expansion, +parameter expansion, command substitution and arithmetic expansion and +the expanded form of the word is checked against it. +If a match is found, the corresponding list is executed. If the selected list is terminated by the control operator .Ql ;& instead of .Ql ;; , -execution continues with the next list. +execution continues with the next list, +continuing until a list terminated with +.Ql ;; +or the end of the +.Ic case +command. The exit code of the .Ic case command is the exit code of the last command executed in the list or