getopt Posted byjeffrin December 25, 2009 getopt is used to break up (parse) options in command lines for easy parsing by shell procedures, and to check for legal options.