|
|
Line 13: |
Line 13: |
|
| |
|
| == OPTIONS == | | == OPTIONS == |
| All of the single-character shell options documented in the description of the set builtin com‐
| | ''-o''を含め、set組み込みコマンドの説明で文書化されている1文字のシェル・オプションはすべて、シェル起動時のオプションとして使用できる。 さらに、bashは起動時に以下のオプションを解釈する: |
| mand, including -o, can be used as options when the shell is invoked. In addition, bash inter‐
| |
| prets the following options when it is invoked:
| |
|
| |
|
| -c If the -c option is present, then commands are read from the first non-option argument
| | ;-c |
| command_string. If there are arguments after the command_string, the first argument is
| | :オプションがある場合、コマンドは最初の非オプション引数 command_string から読み込まれる。 -cオプションがある場合、コマンドは最初のオプション以外の引数command_stringから読み込まれる。command_stringの後に引数がある場合、最初の引数は$0に代入され、残りの引数は位置パラメーターに代入される。0への代入は、シェルの名前を設定し、警告やエラーメッセージで使われる。 |
| assigned to $0 and any remaining arguments are assigned to the positional parameters.
| | ;-i |
| The assignment to $0 sets the name of the shell, which is used in warning and error
| | :オプションを指定すると、シェルは対話型になる。 |
| messages.
| | ;-l |
| -i If the -i option is present, the shell is interactive.
| | :bash をログイン・シェルとして起動したかのように動作させる(後述の '''[[#INVOCATION|INVOCATION]]''' を参照)。 |
| -l Make bash act as if it had been invoked as a login shell (see INVOCATION below).
| | ;-r |
| -r If the -r option is present, the shell becomes restricted (see RESTRICTED SHELL below).
| | :オプションを指定すると、シェルが制限される(後述の'''[[#RESTRICTED SHELL|RESTRICTED SHELL]]'''を参照)。 |
| -s If the -s option is present, or if no arguments remain after option processing, then
| | ;-s |
| commands are read from the standard input. This option allows the positional parame‐
| | :オプションがある場合、またはオプション処理後に引数が残っていない場合、コマンドは標準入力から読み込まれる。 このオプションにより、対話型シェルを起動するときや、 パイプ経由で入力を読み込むときに、位置パラメーターを設定できる。 |
| ters to be set when invoking an interactive shell or when reading input through a pipe.
| | ;-v |
| -v Print shell input lines as they are read.
| | :読み込まれたシェル入力行を表示する。 |
| -x Print commands and their arguments as they are executed.
| | ;-x |
| -D A list of all double-quoted strings preceded by $ is printed on the standard output.
| | :実行されたコマンドとその引数を表示する。 |
| These are the strings that are subject to language translation when the current locale
| | ;-D |
| is not C or POSIX. This implies the -n option; no commands will be executed.
| | :$で始まるすべての二重引用符付き文字列のリストを標準出力に出力する。 |
| [-+]O [shopt_option]
| |
| shopt_option is one of the shell options accepted by the shopt builtin (see SHELL
| |
| BUILTIN COMMANDS below). If shopt_option is present, -O sets the value of that option;
| |
| +O unsets it. If shopt_option is not supplied, the names and values of the shell op‐
| |
| tions accepted by shopt are printed on the standard output. If the invocation option
| |
| is +O, the output is displayed in a format that may be reused as input.
| |
| -- A -- signals the end of options and disables further option processing. Any arguments
| |
| after the -- are treated as filenames and arguments. An argument of - is equivalent to
| |
| --.
| |
|
| |
|
| Bash also interprets a number of multi-character options. These options must appear on the com‐
| | これらは、現在のロケールがCでもPOSIXでもない場合に言語変換の対象となる文字列である。 これは-nオプションを意味し、コマンドは実行されない。 |
| mand line before the single-character options to be recognized.
| | ;<nowiki>[-+]O [shopt_option]</nowiki> |
| | :shopt_optionは、shopt組み込み関数が受け付けるシェル・オプションの1つである(後述の'''[[#SHELL BUILTIN COMMANDS|SHELL BUILTIN COMMANDS]]'''参照)。 shopt_option が存在する場合、-O はそのオプションの値を設定する; |
| | :+Oで設定を解除する。 shopt_option が与えられない場合、 shopt が受け付けるシェルオプションの名前と値が標準出力に表示される。 起動オプションが +O の場合、出力は入力として再利用できる形式で表示される。 |
| | :-- はオプションの終了を知らせ、それ以降のオプション処理を無効にする。 の後の引数は、ファイル名と引数として扱われる。 '-'の引数は''--''と等価である。 |
|
| |
|
| --debugger
| | Bashは、複数文字のオプションも解釈する。 これらのオプションは、1文字のオプションよりも前にコマンドラインに現れなければ認識されない。 |
| Arrange for the debugger profile to be executed before the shell starts. Turns on ex‐
| |
| tended debugging mode (see the description of the extdebug option to the shopt builtin be‐
| |
| low).
| |
| --dump-po-strings
| |
| Equivalent to -D, but the output is in the GNU gettext po (portable object) file format.
| |
| --dump-strings
| |
| Equivalent to -D.
| |
| --help Display a usage message on standard output and exit successfully.
| |
| --init-file file
| |
| --rcfile file
| |
| Execute commands from file instead of the system wide initialization file /etc/bash.bashrc
| |
| and the standard personal initialization file ~/.bashrc if the shell is interactive (see
| |
| INVOCATION below).
| |
|
| |
|
| --login
| | ;--debugger |
| Equivalent to -l.
| | :シェルが起動する前にデバッガ・プロファイルが実行されるようにする。 拡張デバッグモードをオンにする(以下のshopt組み込み関数へのextdebugオプションの説明を参照のこと)。 |
| | ;--dump-po-strings |
| | :-D と同等だが、出力は GNU gettext po (portable object) ファイル形式になる。 |
| | ;--dump-strings |
| | :-Dと同等である。 |
| | ;--help Display a usage message on standard output and exit successfully. |
| | ;--init-file file |
| | ;--rcfile file |
| | :シェルが対話型の場合、システム全体の初期化ファイル[[/etc/bash.bashrc]]と標準の個人用初期化ファイル~/.bashrcの代わりに、ファイルからコマンドを実行する(下記の'''[[#INVOCATION|INVOCATION]]'''を参照)。 |
| | ;--login |
| | :-lと同等である。 |
|
| |
|
| --noediting
| | ;--noediting |
| Do not use the GNU readline library to read command lines when the shell is interactive.
| | :シェルが対話型の場合、GNU readline ライブラリを使ってコマンドラインを読まない。 |
|
| |
|
| --noprofile
| | ;--noprofile |
| Do not read either the system-wide startup file /etc/profile or any of the personal ini‐
| | :システム全体の起動ファイル[[/etc/profile]]や、個人用の初期化ファイル~/.bash_profile、~/.bash_login、~/.profileを読み込まない。 デフォルトでは、bashはログイン・シェルとして起動されたときにこれらのファイルを読み込む(後述の'''[[#INVOCATION|INVOCATION]]'''を参照)。 |
| tialization files ~/.bash_profile, ~/.bash_login, or ~/.profile. By default, bash reads
| |
| these files when it is invoked as a login shell (see INVOCATION below).
| |
|
| |
|
| --norc Do not read and execute the system wide initialization file /etc/bash.bashrc and the per‐
| | ;--norc |
| sonal initialization file ~/.bashrc if the shell is interactive. This option is on by de‐
| | :シェルが対話型の場合、システム全体の初期化ファイル[[/etc/bash.bashrc]]と個人の初期化ファイル~/.bashrcを読み込んで実行しない。 シェルが sh として起動された場合、このオプションはデフォルトでオンになる。 |
| fault if the shell is invoked as sh.
| | ;--posix |
| | :デフォルトの動作がPOSIX標準と異なるbashの動作を標準に合わせるように変更する(posixモード)。 posixモードがbashの動作にどのような影響を与えるかについての詳細は、後述の'''[[#SEE ALSO|SEE ALSO]]'''を参照のこと。 |
|
| |
|
| --posix
| | ;--restricted |
| Change the behavior of bash where the default operation differs from the POSIX standard to
| | :シェルが制限された状態になる(下記の'''[[#RESTRICTED SHELL|RESTRICTED SHELL]]'''を参照)。 |
| match the standard (posix mode). See SEE ALSO below for a reference to a document that
| |
| details how posix mode affects bash's behavior.
| |
|
| |
|
| --restricted
| | ;--verbose |
| The shell becomes restricted (see RESTRICTED SHELL below).
| | :-vと同等である。 |
|
| |
|
| --verbose
| | ;--version |
| Equivalent to -v.
| | :bashのバージョン情報を標準出力に表示し、正常終了する。 |
| | |
| --version
| |
| Show version information for this instance of bash on the standard output and exit suc‐
| |
| cessfully.
| |
|
| |
|
| == ARGUMENTS == | | == ARGUMENTS == |