GeeksforGeeks » Interview Questions
getopts usage
(2 posts)-
What is the usage of getopts in unix ?
-
getopts obtains options and their arguments from a list of parameters that follows the standard POSIX.2 option syntax (that is, single letters preceded by a - and possibly followed by an argument value; the single letters may be grouped). Typically, shell scripts use getopts to parse arguments passed to them. When you specify args on the getopts command line, getopts parses those arguments instead of the script command line.
Reply
You must log in to post.