SYNOPSIS

       set -- `getopt optstring $*`


DESCRIPTION

       getopt  rearranges  command  options  for shell scripts.  It accepts an
       optstring argument like getopt(3), i.e. a list  of  characters  (bytes)
       where each character represents an option letter.  A character followed
       by : indicates that the option has an argument.  When an argument  list
       is  passed  to getopt, it prints it such that each option forms a sepa-
       rate argument, with option and option argument separated  by  a  space,
       and  a  `--' separates options and remaining non-option arguments.  For
       example, `getopt a:bc -bc -aarg' results in the output `-b  -c  -a  arg
       --'.


SEE ALSO

       sh(1)


NOTES

       getopt cannot handle arguments that contain white space.  For this rea-
       son, the shell special command getopts is preferred over getopt.



Heirloom Toolchest                  6/24/05                          GETOPT(1)

Man(1) output converted with man2html