GETOPT(1) GETOPT(1) getopt - () getopt - getopt [] [--] - getopt [] -o|--options - [] [--] getopt () , . getopt(3) . getopt : getopt ( SYNOPSIS-), ( SYNOPSIS-). - , ,,--". -o --options , . GETOPT_COMPATIBLE , ( -, SYNOPSIS-), getopt getopt(1). ( ). getopt*(1) ( ) - . , ( *eval). , getopt ( SYNOPSIS-). getopt-(1) , (-T). -a, --alternative '-'. -l, --longoptions - The long (multi-character) options to be recognized. More than one option name may be specified at once, by separating the names with commas, whitespace (spaces, tabs, or newlines). This option may be given more than once, the longopts are cumulative. Each long option name in longopts may be followed by one colon to indicate it has a required argument, and by two colons to indicate it has an optional argument. -n, --name - getopt(3) . getopt-(1) ,,getopt"-. -o, --options - ( ) . , getopt- - ( ) . - . + - ( ). -q, --quiet getopt(3). -Q, --quiet-output . getopt(3), -q. -s, --shell . -s , BASH . sh bash, csh, tcsh. -T, --test getopt(1) . , 4. getopt-(1), GETOPT_COMPATIBLE , ,,--" 0. -u, --unquoted . ( ) ,,havoc" ( getopt(1) ). -U, --unknown Leave unknown options as they are and suppress error messages from getopt(3). Since there is no way to know whether an unknown option requires an argument, a non-option argument that follows the unknown option after a whitespace, is considered an option argument, therefore the argument will be left untouched and printed next to the respective unknown option. To prevent unexpected behavior, short options should be specified individually. -h, --help . -V, --version . getopt- ( SYNOPSIS-). () . . getopt- ( ). getopt(3) . . , , , - . - , ,,:" ,,;" ,,?", getopt(3).. , (. ). , . ,,-", ( ) . -- . , , =, (. ). , , =, ( =, , ; , ). , . -, , - . -- - . POSIXLY_CORRECT , +, - - . . , - . (-) , - ( ). , ( ,,shift" ). , . , , , , - . , - . , . , , , () . getopt-(1) . -, . , ,,--" . ,,-" . . , - . -- , - , . -, - ( SYNOPSIS-; - + ). , ,," - . , . , . . ( eval skoqke), . GETOPT_COMPATIBLE , SYNOPSIS , -u. . -s' . : sh, bash, csh tcsh. , ,,": sh- csh- . , . ,,-" ,,+" . SYNOPSIS ; POSIXLY_CORRECT . ,,+", POSIXLY_CORRECT , - (., ,,-") . -. ,,-", - ; , ,,--" . ,,--" , . getopt-(1) . , . ,,getopt"- -, getopt . , . (. - ), POSIXLY_CORRECT , , gezopt + . GETOPT_COMPATIBLE getopt . POSIXLY_CORRECT 100% ,," . , . , - + . getopt 0 , 1 getopt(3) , 2 , 3 , 4 -T. ,,(ba)sh" ,,(t)csh" getopt(1) , /usr/share/doc/util-linux. POSIXLY_CORRECT getopt(3) . , . - , ,,-". GETOPT_COMPATIBLE getopt SYNOPSIS. getopt(3) ( ). getopt(1) . ( ). Frodo Looijaard bash(1), tcsh(1), getopt(3) , ,,https://github.com/util-linux/util-linux/issues[issue tracker]". getopt ,,util-linux" . util-linux 2.42 2026-04-01 GETOPT(1)