diff options
author | jilles <jilles@FreeBSD.org> | 2011-06-24 20:23:50 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-06-24 20:23:50 +0000 |
commit | f5e9daf260f37151cc8e3c60b75612ca9ff3352c (patch) | |
tree | 185a7b040bbc7fa70c020709f3a4fdf87c737407 /bin | |
parent | 72142e46137809c92085360ce8a3ea21853b1424 (diff) | |
download | FreeBSD-src-f5e9daf260f37151cc8e3c60b75612ca9ff3352c.zip FreeBSD-src-f5e9daf260f37151cc8e3c60b75612ca9ff3352c.tar.gz |
sh(1): Document the case command better.
Suggested by: netchild
Reviewed by: gjb
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/sh.1 | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index e318216..bb101336 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 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 |