|
|
Line 18: |
Line 18: |
|
| |
|
| == OPTIONS == | | == OPTIONS == |
| -a, --alternative
| | ;-a, --alternative |
| Allow long options to start with a single '-'.
| | :長いオプションは'-'で始まるようにする。 |
|
| |
|
| -h, --help
| | ;-h, --help |
| Display help text and exit. No other output is generated.
| | :ヘルプテキストを表示して終了する。 それ以外の出力は生成されない。 |
|
| |
|
| -l, --longoptions longopts
| | ;-l, --longoptions longopts |
| The long (multi-character) options to be recognized. More than one option name may be speci‐
| | :認識する長い(複数文字の)オプション。 カンマで区切ることで、一度に複数のオプション名を指定できる。 このオプションは複数回指定でき、longoptsは累積される。 longopts の各長いオプション名の後には、必須引数を持つことを示すコロン 1 つと、 オプション引数を持つことを示すコロン 2 つを続けることができる。 |
| fied at once, by separating the names with commas. 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 ar‐
| |
| gument.
| |
|
| |
|
| -n, --name progname
| | ;-n, --name progname |
| The name that will be used by the getopt(3) routines when it reports errors. Note that er‐
| | :'''[https://manpages.debian.org/bookworm/manpages-dev/getopt.3.en.html getopt]'''(3) ルーチンがエラーを報告するときに使われる名前。 '''getopt'''(1) のエラーは getopt から来たものとして報告されることに注意。 |
| rors of getopt(1) are still reported as coming from getopt.
| |
|
| |
|
| -o, --options shortopts
| | ;-o, --options shortopts |
| The short (one-character) options to be recognized. If this option is not found, the first
| | :認識される短い(1文字の)オプション。 このオプションが見つからない場合、 getopt の最初のパラメータのうち、 '-' で始まらないもの(オプション引数でないもの)が、 短いオプション文字列として使われる。 shortopts の各ショートオプション文字の後には、必須引数であることを示すコロンを 1 つ、 オプション引数であることを示すコロンを 2 つ続けることができる。 shortoptsの最初の文字を'+'または'-'にすることで、オプションの解析方法と出力の生成方法に影響を与えることができる(詳細は[[#SCANNING MODES]]セクションを参照)。 |
| parameter of getopt that does not start with a '-' (and is not an option argument) is used as
| |
| the short options string. Each short option character in shortopts may be followed by one
| |
| colon to indicate it has a required argument, and by two colons to indicate it has an op‐
| |
| tional argument. The first character of shortopts may be '+' or '-' to influence the way op‐
| |
| tions are parsed and output is generated (see section SCANNING MODES for details).
| |
|
| |
|
| -q, --quiet
| | ;-q, --quiet |
| Disable error reporting by getopt(3).
| | :'''[https://manpages.debian.org/bookworm/manpages-dev/getopt.3.en.html getopt]'''(3)によるエラー報告を無効化。 |
|
| |
|
| -Q, --quiet-output
| | ;-Q, --quiet-output |
| Do not generate normal output. Errors are still reported by getopt(3), unless you also use
| | :通常の出力を生成しない。 -q も使用しない限り、エラーは ''[https://manpages.debian.org/bookworm/manpages-dev/getopt.3.en.html getopt]'''(3) によって報告される。 |
| -q.
| |
|
| |
|
| -s, --shell shell
| | ;-s, --shell shell |
| Set quoting conventions to those of shell. If the -s option is not given, the BASH conven‐
| | :シェルの引用規約を設定する。 -sオプションが与えられない場合は、'''BASH'''の規約が使用される。 現在有効な引数は 'sh'、'bash'、'csh'、'tcsh' である。 |
| tions are used. Valid arguments are currently 'sh' 'bash', 'csh', and 'tcsh'.
| |
|
| |
|
| -T, --test
| | ;-T, --test |
| Test if your getopt(1) is this enhanced version or an old version. This generates no output,
| | :'''getopt'''(1) がこの拡張バージョンか古いバージョンかをテストする。 これは出力を生成せず、エラーステータスを 4 に設定する。 '''getopt'''(1) の他の実装、および環境変数 '''GETOPT_COMPATIBLE''' が設定されている場合のこのバージョンは、 '--' とエラーステータス 0 を返す。 |
| and sets the error status to 4. Other implementations of getopt(1), and this version if the
| |
| environment variable GETOPT_COMPATIBLE is set, will return '--' and error status 0.
| |
|
| |
|
| -u, --unquoted
| | ;-u, --unquoted |
| Do not quote the output. Note that whitespace and special (shell-dependent) characters can
| | :出力を引用符で囲まない。 このモードでは (他の '''getopt'''(1) の実装でそうであるように) 空白文字や特殊な (シェル依存の) 文字が大混乱を引き起こす可能性があることに注意。 |
| cause havoc in this mode (like they do with other getopt(1) implementations).
| |
|
| |
|
| -V, --version
| | ;-V, --version |
| Display version information and exit. No other output is generated.
| | :バージョン情報を表示して終了する。 他の出力は生成されない。 |
|
| |
|
| == PARSING == | | == PARSING == |