summaryrefslogtreecommitdiff
path: root/usr.bin/getopt
diff options
context:
space:
mode:
authorJohn-Mark Gurney <jmg@FreeBSD.org>2015-08-01 17:27:47 +0000
committerJohn-Mark Gurney <jmg@FreeBSD.org>2015-08-01 17:27:47 +0000
commitc47f6acf73561f57a808c87273d044871ceb7953 (patch)
tree1409e54009ab7640c9cba0214890cdd104a6c2d5 /usr.bin/getopt
parent98685dc8af6354777ae09c5763fe4cbc9f3d99a1 (diff)
downloadsrc-test2-c47f6acf73561f57a808c87273d044871ceb7953.tar.gz
src-test2-c47f6acf73561f57a808c87273d044871ceb7953.zip
use : instead of true...
Change file file to file1 file2, partly for igor, and partly because it's odd to pass the same file to a command twice..
Notes
Notes: svn path=/head/; revision=286159
Diffstat (limited to 'usr.bin/getopt')
-rw-r--r--usr.bin/getopt/getopt.112
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/getopt/getopt.1 b/usr.bin/getopt/getopt.1
index d8271372a922..781b6e0b4406 100644
--- a/usr.bin/getopt/getopt.1
+++ b/usr.bin/getopt/getopt.1
@@ -1,6 +1,6 @@
.\" $FreeBSD$
.\"
-.Dd January 26, 2011
+.Dd August 1, 2015
.Dt GETOPT 1
.Os
.Sh NAME
@@ -62,7 +62,7 @@ set \-\- $args
# You cannot use the set command with a backquoted getopt directly,
# since the exit code from getopt would be shadowed by those of set,
# which is zero by definition.
-while true; do
+while :; do
case "$1" in
\-a|\-b)
echo "flag $1 set"; sflags="${1#-}$sflags"
@@ -83,10 +83,10 @@ echo "oarg is '$oarg'"
.Pp
This code will accept any of the following as equivalent:
.Bd -literal -offset indent
-cmd \-aoarg file file
-cmd \-a \-o arg file file
-cmd \-oarg -a file file
-cmd \-a \-oarg \-\- file file
+cmd \-aoarg file1 file2
+cmd \-a \-o arg file1 file2
+cmd \-oarg -a file1 file2
+cmd \-a \-oarg \-\- file1 file2
.Ed
.Sh SEE ALSO
.Xr getopts 1 ,