|
|
Line 1,918: |
Line 1,918: |
|
| |
|
| == SHELL BUILTIN COMMANDS == | | == SHELL BUILTIN COMMANDS == |
| Unless otherwise noted, each builtin command documented in this section as accepting options preceded by - accepts -- to signify the end of the options. The :, true, false, and test/[ builtins do not accept options and do not treat -- specially. The exit, logout, return, break, continue, let, and shift builtins accept and process arguments beginning with - without requiring --.
| | 特に断りのない限り、このセクションでオプションを受け付けるとして文書化されている各 組み込みコマンドは、オプションの終わりを示す -- を受け付ける。 test/[、true、false、test/[ 組み込み関数はオプションを受け付けず、 -- を特別に扱わない。 exit、logout、return、break、continue、let、shift 組み込み関数は、-- を必要とせずに - で始まる引数を受け入れ処理する。 |
| Other builtins that accept arguments but are not specified as accepting options interpret arguments beginning with - as invalid options and require -- to prevent this interpretation.
| | 引数を受け付けるがオプションを受け付けるように指定されていない他の組み込み関数は、 - で始まる引数を無効なオプションとして解釈し、この解釈を防ぐために -- を要求する。 |
| ;<nowiki>: [arguments]</nowiki> | | ;<nowiki>: [arguments]</nowiki> |
| :No effect; the command does nothing beyond expanding arguments and performing any specified redirections. The return status is zero. | | :コマンドは引数を展開し、指定されたリダイレクションを実行するだけで、何もしない。 リターンステータスは0である。 |
|
| |
|
| ;<nowiki>. filename [arguments]</nowiki> | | ;<nowiki>. filename [arguments]</nowiki> |
| ;<nowiki>source filename [arguments]</nowiki> | | ;<nowiki>source filename [arguments]</nowiki> |
| :Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename. If filename does not contain a slash, filenames in PATH are used to find the directory containing filename. The file searched for in PATH need not be executable. When bash is not in posix mode, the current directory is searched if no file is found in PATH. If the sourcepath option to the shopt builtin command is turned off, the PATH is not searched. If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged. If the -T option is enabled, source inherits any trap on DEBUG; if it is not, any DEBUG trap string is saved and restored around the call to source, and source unsets the DEBUG trap while it executes. If -T is not set, and the sourced file changes the DEBUG trap, the new value is retained when source completes. The return status is the status of the last command exited within the script (0 if no commands are executed), and false if filename is not found or cannot be read. | | :現在のシェル環境で filename からコマンドを読み込んで実行し、 filename から最後に実行されたコマンドの終了ステータスを返す。 filename にスラッシュが含まれていない場合、PATH 内のファイル名を使用して filename を含むディレクトリを検索する。 PATHで検索されるファイルは実行可能である必要はない。 bashがposixモードでない場合、PATHにファイルが見つからなければ、カレント・ディレクトリが検索される。 shopt組み込みコマンドのsourcepathオプションがオフの場合、PATHは検索されない。 引数が与えられている場合、それらは filename が実行されるときの位置パラメーターとなる。 それ以外の場合、位置パラメーターは変更されない。 -Tオプションが有効な場合、sourceはDEBUGのトラップを継承する。有効でない場合、DEBUGトラップ文字列はsourceへの呼び出しの周囲に保存および復元され、sourceは実行中にDEBUGトラップの設定を解除する。 Tが設定されておらず、ソース・ファイルがDEBUGトラップを変更した場合、ソースが完了すると新しい値が保持される。 戻りステータスは、スクリプト内で最後に終了したコマンドのステータス(コマンドが実行されていない場合は0)であり、filenameが見つからないか読み取れない場合はfalseである。 |
|
| |
|
| ;<nowiki>alias [-p] [name[=value] ...]</nowiki> | | ;<nowiki>alias [-p] [name[=value] ...]</nowiki> |