Document that `in word ...' is optional in the for command.
This commit is contained in:
parent
ac4b76b7ff
commit
a01459df60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149763
@ -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 September 2, 2005
|
.Dd September 3, 2005
|
||||||
.Dt SH 1
|
.Dt SH 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -787,10 +787,15 @@ repeat until the exit status of the first list is zero.
|
|||||||
The syntax of the
|
The syntax of the
|
||||||
.Ic for
|
.Ic for
|
||||||
command is:
|
command is:
|
||||||
.Dl Ic for Ar variable Ic in Ar word ...
|
.Dl Ic for Ar variable Op Ic in Ar word ...
|
||||||
.Dl Ic do Ar list
|
.Dl Ic do Ar list
|
||||||
.Dl Ic done
|
.Dl Ic done
|
||||||
.Pp
|
.Pp
|
||||||
|
If
|
||||||
|
.Ic in
|
||||||
|
and the following words are ommitted,
|
||||||
|
.Ic in Li $@
|
||||||
|
is used instead.
|
||||||
The words are expanded, and then the list is executed
|
The words are expanded, and then the list is executed
|
||||||
repeatedly with the variable set to each word in turn.
|
repeatedly with the variable set to each word in turn.
|
||||||
The
|
The
|
||||||
|
Loading…
Reference in New Issue
Block a user