|
|
Line 78: |
Line 78: |
|
| |
|
| ==QUOTING== | | ==QUOTING== |
| In compatible mode, whitespace or 'special' characters in arguments or non-option parameters are not
| | 互換モードでは、引数やオプション以外のパラメータに含まれる空白文字や「特殊」文字は 正しく処理されない。 出力はシェルスクリプトに送られるため、スクリプトは出力をどのように個別の パラメータに分割すればよいのかわからない。 この問題を回避するために、この実装ではクォート処理を提供している。 これは、各パラメーターを引用符で囲んで出力を生成するというものである。 この出力が再び(通常はシェルの'''eval'''コマンドによって)シェルに供給されるとき、パラメータごとに正しく分割される。 |
| handled correctly. As the output is fed to the shell script, the script does not know how it is
| |
| supposed to break the output into separate parameters. To circumvent this problem, this implementa‐
| |
| tion offers quoting. The idea is that output is generated with quotes around each parameter. When
| |
| this output is once again fed to the shell (usually by a shell eval command), it is split correctly
| |
| into separate parameters.
| |
|
| |
|
| Quoting is not enabled if the environment variable GETOPT_COMPATIBLE is set, if the first form of
| | 環境変数'''GETOPT_COMPATIBLE'''が設定されている場合、'''SYNOPSIS'''の最初の形式が使用されている場合、またはオプション'-u'が見つかった場合、クォートは有効にならない。 |
| the SYNOPSIS is used, or if the option '-u' is found.
| |
|
| |
|
| Different shells use different quoting conventions. You can use the '-s' option to select the shell
| | シェルによって引用符の付け方が異なる。 '-s'オプションで使用するシェルを選択できる。 現在、以下のシェルがサポートされている: ''[[/usr/bin/sh|sh]]''、''[[/usr/bin/bash|bash]]'''、'''[[/usr/bin/csh|csh]]'''、'''[[/usr/bin/tcsh|tcsh]]'''である。 shのようなクォート規則とcshのようなクォート規則である。 他のシェルスクリプト言語を使用している場合でも、これらのフレーバーのいずれかを使用できる可能性がある。 |
| you are using. The following shells are currently supported: 'sh', 'bash', 'csh' and 'tcsh'. Actu‐
| |
| ally, only two 'flavors' are distinguished: sh-like quoting conventions and csh-like quoting conven‐
| |
| tions. Chances are that if you use another shell script language, one of these flavors can still be
| |
| used.
| |
|
| |
|
| ==SCANNING MODES== | | ==SCANNING MODES== |