/usr/bin/bash: Difference between revisions

Line 2,138: Line 2,138:


;<nowiki>disown [-ar] [-h] [jobspec ... | pid ... ]</nowiki>
;<nowiki>disown [-ar] [-h] [jobspec ... | pid ... ]</nowiki>
:Without options, remove each jobspec from the table of active jobs.  If jobspec is  not present,  and  neither  the -a nor the -r option is supplied, the current job is used.  If the -h option is given, each jobspec is not removed from the table, but is marked so  that SIGHUP is not sent to the job if the shell receives a SIGHUP.  If no jobspec is supplied, the -a option means to remove or mark all jobs; the -r option without a jobspec argument restricts  operation  to  running  jobs.  The return value is 0 unless a jobspec does not specify a valid job.
:オプションを指定しない場合、アクティブなジョブのテーブルから各 jobspec を削除する。 jobspec が存在せず、-a オプションも -r オプションも与えられない場合、 現在のジョブが使用される。 h オプションが指定された場合、各 jobspec はテーブルから削除されないが、 シェルが SIGHUP を受信してもそのジョブに SIGHUP が送られないようにマークされる。 jobspec が与えられない場合、-a オプションはすべてのジョブを削除またはマークすることを意味する。jobspec 引数なしの -r オプションは、実行中のジョブに操作を制限する。 jobspec が有効なジョブを指定しない限り、戻り値は 0 である。


;<nowiki>echo [-neE] [arg ...]</nowiki>
;<nowiki>echo [-neE] [arg ...]</nowiki>
:Output the args, separated by spaces, followed by a newline. The return status is  0  unless  a  write  error occurs.  If -n is specified, the trailing newline is suppressed.  If the -e option is given, interpretation of the following  backslash-escaped  characters  is enabled.  The  -E  option disables the interpretation of these escape characters, even on systems where they are interpreted by default.  The xpg_echo shell option may be  used  to dynamically  determine  whether  or  not  echo expands these escape characters by default. echo does not interpret -- to mean the end of options.  echo interprets the following  escape sequences:
:空白で区切られた引数を出力し、その後に改行する。 書き込みエラーが発生しない限り、リターン・ステータスは0である。 nを指定すると、末尾の改行が抑制される。 eオプションを指定すると、以下のバックスラッシュ・エスケープ文字の解釈が有効になる。 Eオプションを指定すると、これらのエスケープ文字がデフォルトで解釈されるシステムでも、その解釈を無効にする。 xpg_echo シェルオプションを使用すると、echo がデフォルトでこれらのエスケープ文字を展開するかどうかを動的に決定することができる。 echo -- をオプションの終わりと解釈しない:
:;\a
:;\a
::alert (bell)
::アラート (ベル)
:;\b
:;\b
::backspace
::バックスペース
:;\c
:;\c
::suppress further output
::それ以上の出力を抑制する
:;\e
:;\e
:;\E
:;\E
::an escape character
::エスケープキャラクター
:;\f
:;\f
::form feed
::フォームフィード
:;\n
:;\n
::new line
::改行
:;\r
:;\r
::carriage return
::キャリッジリターン
:;\t
:;\t
::horizontal tab
::水平タブ
:;\v
:;\v
::vertical tab
::垂直タブ
:;\\
:;\\
::backslash
::バックスラッシュ
:;\0nnn
:;\0nnn
::the  eight-bit  character  whose  value is the octal value nnn (zero to three octal digits)
::値が8進数値nnn(0~3桁の8進数)である8ビット文字
:;\xHH
:;\xHH
::the eight-bit character whose value is the hexadecimal value HH  (one  or  two  hex digits)
::値が16進数HH(1桁または2桁の16進数)である8ビット文字
:;\uHHHH
:;\uHHHH
::the  Unicode  (ISO/IEC 10646) character whose value is the hexadecimal value HHHH (one to four hex digits)
::ユニコード(ISO/IEC 10646)文字で、その値は16進数値HHHH(1桁から4桁の16進数)である。
:;\UHHHHHHHH
:;\UHHHHHHHH
::the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value HHHHHHHH (one to eight hex digits)
::ユニコード(ISO/IEC 10646)文字で、その値が16進数のHHHHHHHHH(1~8桁の16進数)である。


;<nowiki>enable [-a] [-dnps] [-f filename] [name ...]</nowiki>
;<nowiki>enable [-a] [-dnps] [-f filename] [name ...]</nowiki>
:Enable  and  disable  builtin  shell  commands.  Disabling a builtin allows a disk command which has the same name as a shell builtin to be executed without specifying a full  pathname, even though the shell normally searches for builtins before disk commands.  If -n is used, each name is disabled; otherwise, names are enabled.  For example, to use  the  test binary  found  via  the PATH instead of the shell builtin version, run ``enable -n test''. The -f option means to load the new builtin command name from shared object  filename,  on systems  that  support  dynamic loading.  The -d option will delete a builtin previously loaded with -f.  If no name arguments are given, or if the -p option is supplied,  a  list of  shell  builtins  is printed.  With no other option arguments, the list consists of all enabled shell builtins.  If -n is supplied, only disabled builtins are printed.  If -a is supplied,  the  list  printed  includes all builtins, with an indication of whether or not each is enabled.  If -s is supplied,  the  output  is  restricted  to  the  POSIX special builtins.  The return value is 0 unless a name is not a shell builtin or there is an error loading a new builtin from a shared object.
:シェル組み込みコマンドを有効/無効にする。 組み込みコマンドを無効にすると、シェルは通常ディスクコマンドの前に組み込みコマンドを検索するにもかかわらず、シェル組み込みコマンドと同じ名前のディスクコマンドをフルパス名を指定せずに実行できるようになる。 n を使用すると、各名称は無効になり、それ以外の場合は有効になる。 例えば、シェルのビルトインバージョンの代わりに PATH 経由で見つかった test バイナリを使うには、``enable -n test'' を実行する。fオプションは、動的ロードをサポートしているシステムでは、共有オブジェクトファイル名から新しい組み込みコマンド名をロードすることを意味する。 dオプションは-fでロードした組み込みコマンドを削除する。 name 引数が与えられないか、または -p オプションが与えられると、 シェル組み込みコマンドのリストが表示される。 他のオプション引数を指定しない場合、リストは有効なシェル組み込み関数すべてから構成される。 n を指定すると、無効な組み込み関数だけが表示される。 a を指定すると、すべての組み込み関数が出力され、それぞれが有効かどうかも表示される。 s を指定すると、出力は POSIX 特殊組み込み関数に制限される。 戻り値は、名前がシェル組み込み関数でないか、共有オブジェクトからの新規組み込み関数のロードにエラーがない限り 0 である。


;<nowiki>eval [arg ...]</nowiki>
;<nowiki>eval [arg ...]</nowiki>
The args are read and concatenated together into a single command.  This command  is  then read  and executed by the shell, and its exit status is returned as the value of eval.  If there are no args, or only null arguments, eval returns 0.
:引数が読み込まれ、1つのコマンドに連結される。 このコマンドはシェルによって読み込まれ実行され、その終了ステータスがevalの値として返される。 引数がない場合、あるいはnullの引数しかない場合、evalは0を返す。


;exec [-cl] [-a name] [command [arguments]]
;exec [-cl] [-a name] [command [arguments]]
:If command is specified, it replaces the shell.  No new process is created.  The arguments become the arguments to command.  If the -l option is supplied, the shell places a dash at the beginning of the zeroth argument passed to command.  This is what login(1) does.  The -c option causes command to be executed with an empty environment.  If -a is supplied, the shell passes name as the zeroth argument to the executed command.  If  command  cannot  be executed  for some reason, a non-interactive shell exits, unless the execfail shell option is enabled.  In that case, it returns failure.  An interactive shell  returns  failure  if the  file cannot be executed.  A subshell exits unconditionally if exec fails.  If command is not specified, any redirections take effect in the current shell, and the return status is 0.  If there is a redirection error, the return status is 1.
:commandが指定された場合、シェルを置き換える。 新しいプロセスは作られない。 引数は command の引数になる。 l オプションが与えられた場合、シェルは command に渡された引数の 0 番目の先頭にダッシュを置く。 これは login(1) が行うことである。  c オプションを指定すると、コマンドは空の環境で実行される。 a が与えられると、シェルは実行されるコマンドの 0 番目の引数として name を渡す。 何らかの理由でコマンドが実行できなかった場合、execfail シェルオプションが有効になっていない限り、非対話型シェルは終了する。 その場合は失敗を返す。 ファイルを実行できない場合、対話型シェルは失敗を返す。 サブシェルは、execが失敗すると無条件に終了する。 commandが指定されていない場合、リダイレクトは現在のシェルで有効になり、リターン・ステータスは0になる。リダイレクト・エラーがある場合、リターン・ステータスは1になる。


;exit [n]
;exit [n]