getoptcvt — Convert to getopts to Parse Command Options
Synopsis
/usr/lib/getoptcvt [-b] filename
/usr/lib/getoptcvt
Description
Use /usr/lib/getoptcvt to convert getopt output to use getopts instead. getoptcvt reads the shell script in filename , converts it to use getopts instead of getopt, and writes the results on the standard output.
getopts is a built-in Bourne shell command that parses positional parameters and checks for valid options. See sh(1). getopts supports all applicable rules of the command syntax standard (see Rules 3-10, intro(1)). You should use getopts instead of the getopt command. The syntax for the shell's built-in getopts command is
getopts optstring name [argument...]
Get Solaris™ 7 Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.