diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2021-05-04 21:03:32 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2021-05-04 21:03:32 +0000 |
commit | c76a340f1c4f6b735d4f08d15cfab9704cbb6ac2 (patch) | |
tree | b78ecc4375f3ca62a43e595e2e0a35c96027a200 /usr.bin | |
parent | c4ad5ee55ded353eb6fd491fd2ea35840704a2cc (diff) |
shell scripts should use getopts instead of getopt
Add a prominent deprecation notice to getopt.1.
Add examples of the getopts idiom to sh.1 and ksh.1.
Requested by and ok espie@, ok jmc@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/getopt/getopt.1 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/getopt/getopt.1 b/usr.bin/getopt/getopt.1 index 74cd0b459fa..b4a2e4c34c3 100644 --- a/usr.bin/getopt/getopt.1 +++ b/usr.bin/getopt/getopt.1 @@ -1,9 +1,9 @@ -.\" $OpenBSD: getopt.1,v 1.19 2018/03/16 16:58:26 schwarze Exp $ +.\" $OpenBSD: getopt.1,v 1.20 2021/05/04 21:03:31 naddy Exp $ .\" .\" This material, written by Henry Spencer, was released by him .\" into the public domain and is thus not subject to any copyright. .\" -.Dd $Mdocdate: March 16 2018 $ +.Dd $Mdocdate: May 4 2021 $ .Dt GETOPT 1 .Os .Sh NAME @@ -14,6 +14,13 @@ .Ar optstring .Va $* .Sh DESCRIPTION +The +.Nm +utility cannot handle option arguments containing whitespace; +consider using the standard +.Ic getopts +shell built-in instead. +.Pp .Nm is used to break up options in command lines for easy parsing by shell procedures, and to check for legal options. |