/usr/bin/bash: Difference between revisions

Line 2,257: Line 2,257:
::Store the args in the history list as a single entry.  The last command in the history list is removed before the args are added.
::Store the args in the history list as a single entry.  The last command in the history list is removed before the args are added.


:If  the  HISTTIMEFORMAT variable  is set, the time stamp information associated with each history entry is written to the history file, marked with the history  comment  character. When the history file is read, lines beginning with the history comment character followed immediately by a digit are interpreted as timestamps for the following history entry.  The return  value  is 0 unless an invalid option is encountered, an error occurs while reading or writing the history file, an invalid offset is supplied as an argument to  -d,  or  the history expansion supplied as an argument to -p fails.
:'''HISTTIMEFORMAT'''変数が設定されている場合、各履歴エントリーに関連するタイムスタンプ情報は、履歴コメント文字でマークされた履歴ファイルに書き込まれる。ヒストリファイルが読み込まれると、ヒストリコメント文字の直後に数字が続く行は、次のヒストリエントリのタイムスタンプとして解釈される。 無効なオプションに遭遇するか、ヒストリファイルの読み込みまたは書き込み中にエラーが発生するか、-dの引数として無効なオフセットが与えられるか、-pの引数として与えられたヒストリ展開が失敗しない限り、戻り値は0である。


;<nowiki>jobs [-lnprs] [ jobspec ... ]</nowiki>
;<nowiki>jobs [-lnprs] [ jobspec ... ]</nowiki>
;<nowiki>jobs -x command [ args ... ]</nowiki>
;<nowiki>jobs -x command [ args ... ]</nowiki>
:The first form lists the active jobs.  The options have the following meanings:
:最初のフォームは、アクティブなジョブの一覧を表示する。 オプションの意味は以下の通りである:
:;-l
:;-l
::List process IDs in addition to the normal information.
::通常の情報に加えて、プロセスIDをリストアップする。
:;-n
:;-n
::Display  information  only  about  jobs that have changed status since the user was last notified of their status.
::ユーザーが最後にステータスを通知されてからステータスが変更されたジョブに関する情報のみを表示する。
:;-p
:;-p
::List only the process ID of the job's process group leader.
::ジョブのプロセスグループリーダーのプロセスIDのみをリストする。
:;-r
:;-r
::Display only running jobs.
::実行中のジョブのみを表示する。
:;-s
:;-s
::Display only stopped jobs.
::停止したジョブのみを表示する。


:If jobspec is given, output is restricted to information about that job.  The return  status is 0 unless an invalid option is encountered or an invalid jobspec is supplied.
:jobspec が与えられた場合、出力はそのジョブに関する情報に制限される。 無効なオプションに遭遇するか、無効なjobspecが与えられない限り、戻りステータスは0である。


:If  the -x option is supplied, jobs replaces any jobspec found in command or args with the corresponding process group ID, and executes command passing it args, returning  its  exit status.
:-xオプションが与えられた場合、jobsはcommandまたはargsで見つかったjobspecを対応するプロセスグループIDに置き換え、argsを渡してコマンドを実行し、その終了ステータスを返す。


;<nowiki>kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ...</nowiki>
;<nowiki>kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ...</nowiki>
;<nowiki>kill -l|-L [sigspec | exit_status]</nowiki>
;<nowiki>kill -l|-L [sigspec | exit_status]</nowiki>
:Send  the  signal  named  by  sigspec or signum to the processes named by pid or jobspec. sigspec is either a case-insensitive signal name such as SIGKILL (with or without the  SIG prefix) or  a  signal number; signum is a signal number.  If sigspec is not present, then SIGTERM is assumed.  An argument of -l lists the signal names.  If any arguments are  supplied  when  -l is  given,  the  names  of the signals corresponding to the arguments are listed, and the return status is 0.  The exit_status argument to -l is a number specifying either a signal number or the exit status of a process terminated by a signal.  The -L option is equivalent to -l.  kill returns true if at least one signal was successfully sent, or false if an error occurs or an invalid option is encountered.
:sigspec は '''SIGKILL''' のような大文字小文字を区別しないシグナル名 (SIG 接頭辞の有無は問わない) かシグナル番号であり、 signum はシグナル番号である。 sigspecが存在しない場合は、SIGTERMが想定される。 引数 -l は、シグナル名の一覧を示す。 lを指定する際に引数が指定された場合、引数に対応するシグナル名が列挙され、 戻りステータスは0となる。-lの引数exit_statusは、シグナル番号またはシグナルによって 終了したプロセスの終了ステータスを指定する数値である。 killは、少なくとも1つのシグナルが正常に送信された場合は真を返し、 エラーが発生した場合や無効なオプションに遭遇した場合は偽を返す。


;<nowiki>let arg [arg ...]</nowiki>
;<nowiki>let arg [arg ...]</nowiki>
:Each  arg  is  an arithmetic expression to be evaluated (see ARITHMETIC EVALUATION above). If the last arg evaluates to 0, let returns 1; 0 is returned otherwise.
:各argは評価される算術式である(上記の[[#ARITHMETIC EVALUATION|ARITHMETIC EVALUATION ]]を参照)。最後のargが0と評価された場合、letは1を返し、そうでない場合は0が返される。


;<nowiki>local [option] [name[=value] ... | - ]</nowiki>
;<nowiki>local [option] [name[=value] ... | - ]</nowiki>