sh(1): Document the case command better.
Suggested by: netchild Reviewed by: gjb
This commit is contained in:
parent
9cfbe3e76b
commit
b97989d659
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223517
15
bin/sh/sh.1
15
bin/sh/sh.1
@ -32,7 +32,7 @@
|
|||||||
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
|
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd June 18, 2011
|
.Dd June 24, 2011
|
||||||
.Dt SH 1
|
.Dt SH 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -994,11 +994,22 @@ described later),
|
|||||||
separated by
|
separated by
|
||||||
.Ql \&|
|
.Ql \&|
|
||||||
characters.
|
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
|
If the selected list is terminated by the control operator
|
||||||
.Ql ;&
|
.Ql ;&
|
||||||
instead of
|
instead of
|
||||||
.Ql ;; ,
|
.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
|
The exit code of the
|
||||||
.Ic case
|
.Ic case
|
||||||
command is the exit code of the last command executed in the list or
|
command is the exit code of the last command executed in the list or
|
||||||
|
Loading…
Reference in New Issue
Block a user