summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2005-09-03 16:06:04 +0000
committerstefanf <stefanf@FreeBSD.org>2005-09-03 16:06:04 +0000
commit50da0d71bf56d64b1d31b1a4aac5828acc47dc99 (patch)
treea185c79011b97cf1071e60554fb28407cf4c1966 /bin
parent7192488ee7b9b6f455209ae4344497e561cf6e7e (diff)
downloadFreeBSD-src-50da0d71bf56d64b1d31b1a4aac5828acc47dc99.zip
FreeBSD-src-50da0d71bf56d64b1d31b1a4aac5828acc47dc99.tar.gz
Document that `in word ...' is optional in the for command.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/sh.19
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 2e76dee..69e7d46 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 September 2, 2005
+.Dd September 3, 2005
.Dt SH 1
.Os
.Sh NAME
@@ -787,10 +787,15 @@ repeat until the exit status of the first list is zero.
The syntax of the
.Ic for
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 done
.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
repeatedly with the variable set to each word in turn.
The
OpenPOWER on IntegriCloud