August 1999
Intermediate to advanced
1000 pages
83h 9m
English
set -- `getopt optstring $*` The /usr/bin/getopt command is superseded by the getopts command.
Note
getopt is not supported in the next major release. This release provides a getoptcvt conversion tool. For more information about getopts and getoptcvt, see getopts(1)
Use getopt to break up options in command lines for easy parsing by shell procedures and to check for legal options; you use getopts in shell script loops to ensure standard syntax for command-line options. optstring is a string of recognized option letters; see getopt(3C). If you follow a letter with a colon, the option is expected to have an argument that may or may not be separated from it by white space. Use the special ...
Read now
Unlock full access