Fixed bad example.

Added reference to the getopts(1) shell builtin.
This commit is contained in:
Ruslan Ermilov 2004-07-07 17:39:16 +00:00
parent e825f57623
commit b2a75fdfdf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131749

View File

@ -49,7 +49,7 @@ which requires an argument.
args=\`getopt abo: $*\`
# you should not use \`getopt abo: "$@"\` since that would parse
# the arguments differently from what the set command below does.
if [ $? != 0 ]
if [ $? -ne 0 ]
then
echo 'Usage: ...'
exit 2
@ -86,6 +86,7 @@ cmd \-a \-oarg \-\- file file
.Pp
.Ed
.Sh SEE ALSO
.Xr getopts 1 ,
.Xr sh 1 ,
.Xr getopt 3
.Sh DIAGNOSTICS