/usr/bin/bash: Difference between revisions

Line 2,220: Line 2,220:


;<nowiki>help [-dms] [pattern]</nowiki>
;<nowiki>help [-dms] [pattern]</nowiki>
:Display  helpful  information about builtin commands.  If pattern is specified, help gives detailed help on all commands matching pattern; otherwise help for all  the  builtins  and shell control structures is printed.
:組み込みコマンドに関する有用な情報を表示する。 pattern が指定されていれば、help は pattern にマッチするすべてのコマンドに関する詳細なヘルプを表示する。そうでなければ、すべての組み込みコマンドとシェル制御構造に関するヘルプを表示する。
:;-d
:;-d
::Display a short description of each pattern
::各パターンの簡単な説明を表示する
:;-m
:;-m
::Display the description of each pattern in a manpage-like format
::各パターンの説明をマンページのような形式で表示する
:;-s
:;-s
::Display only a short usage synopsis for each pattern
::各パターンについて、短い使用法の概要のみを表示する


:The return status is 0 unless no command matches pattern.
:パターンにマッチするコマンドがなければ、リターンステータスは0である。


;<nowiki>history [n]</nowiki>
;<nowiki>history [n]</nowiki>
Line 2,237: Line 2,237:
;<nowiki>history -p arg [arg ...]</nowiki>
;<nowiki>history -p arg [arg ...]</nowiki>
;<nowiki>history -s arg [arg ...]</nowiki>
;<nowiki>history -s arg [arg ...]</nowiki>
:With  no options, display the command history list with line numbers. Lines listed with a * have been modified. An argument of n lists only the last n lines. If the  shell  variable  HISTTIMEFORMAT is set and not null, it is used as a format string for strftime(3) to display the time stamp associated with each displayed history entry.  No intervening blank is  printed  between  the  formatted time stamp and the history line.  If filename is supplied, it is used as the name of the history file; if not, the value of HISTFILE is  used. Options, if supplied, have the following meanings:
:オプションなしで、コマンド履歴リストを行番号付きで表示する。 の付いた行は変更されている。 引数 n は、最後の n 行だけをリストする。 シェル変数 '''HISTTIMEFORMAT''' が NULL ではなく設定されている場合、 [https://manpages.debian.org/unstable/manpages-dev/strftime.3.en.html strftime](3) のフォーマット文字列として使用され、 表示された各履歴エントリに関連付けられたタイムスタンプが表示される。 フォーマットされたタイムスタンプと履歴行の間には、空白は表示されない。 filename が指定された場合、それが履歴ファイル名として使用される。オプションが与えられた場合、以下の意味を持つ:
:;-c
:;-c
::Clear the history list by deleting all the entries.
::すべてのエントリーを削除して履歴リストを消去する。
:;-d offset
:;-d offset
::Delete  the  history entry at position offset.  If offset is negative, it is interpreted as relative to one greater than the last history position, so  negative  indices count back from the end of the history, and an index of -1 refers to the current history -d command.
::位置 offset のヒストリエントリを削除する。 offsetが負の場合、最後のヒストリ位置より1つ大きい位置からの相対値として解釈されるため、負のインデックスはヒストリの終わりからさかのぼってカウントされ、-1のインデックスは現在のヒストリ-dコマンドを指す。
:;-d start-end
:;-d start-end
::Delete the history entries between positions start and end,  inclusive.  Positive and negative values for start and end are interpreted as described above.
::開始位置と終了位置の間の履歴エントリを削除する。 startとendの正の値と負の値は、上記のように解釈される。
:;-a
:;-a
::Append  the ``new'' history lines to the history file.  These are history lines entered since the beginning of the current bash session, but not already appended  to the history file.
::''新しい''ヒストリ行をヒストリファイルに追加する。 これらの行は現在のbashセッションの開始以降に入力されたヒストリで、まだヒストリファイルに追加されていない行である。
:;-n
:;-n
::Read the history lines not already read from the history file into the current history list.  These are lines appended to the history file since the beginning of the current bash session.
::ヒストリファイルからまだ読み込まれていないヒストリ行を現在のヒストリリストに読み込む。 これらは、現在のbashセッションの開始以降にヒストリファイルに追加された行である。
:;-r
:;-r
::Read the contents of the history file and append them to the current history list.
::履歴ファイルの内容を読み込み、現在の履歴リストに追加する。
:;-w
:;-w
::Write  the current history list to the history file, overwriting the history file's contents.
::現在の履歴リストを履歴ファイルに書き込み、履歴ファイルの内容を上書きする。
:;-p
:;-p
::Perform history substitution on the following args and display the  result  on  the standard output.  Does not store the results in the history list.  Each arg must be quoted to disable normal history expansion.
::以下の引数に対してヒストリ置換を行い、結果を標準出力に表示する。 ヒストリリストには結果を保存しない。 通常のヒストリ展開を無効にするには、各argを引用符で囲む必要がある。
:;-s
:;-s
::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.
::履歴リストに引数を1つのエントリーとして保存する。 履歴リストの最後のコマンドは、引数が追加される前に削除される。


:'''HISTTIMEFORMAT'''変数が設定されている場合、各履歴エントリーに関連するタイムスタンプ情報は、履歴コメント文字でマークされた履歴ファイルに書き込まれる。ヒストリファイルが読み込まれると、ヒストリコメント文字の直後に数字が続く行は、次のヒストリエントリのタイムスタンプとして解釈される。 無効なオプションに遭遇するか、ヒストリファイルの読み込みまたは書き込み中にエラーが発生するか、-dの引数として無効なオフセットが与えられるか、-pの引数として与えられたヒストリ展開が失敗しない限り、戻り値は0である。
:'''HISTTIMEFORMAT'''変数が設定されている場合、各履歴エントリーに関連するタイムスタンプ情報は、履歴コメント文字でマークされた履歴ファイルに書き込まれる。ヒストリファイルが読み込まれると、ヒストリコメント文字の直後に数字が続く行は、次のヒストリエントリのタイムスタンプとして解釈される。 無効なオプションに遭遇するか、ヒストリファイルの読み込みまたは書き込み中にエラーが発生するか、-dの引数として無効なオフセットが与えられるか、-pの引数として与えられたヒストリ展開が失敗しない限り、戻り値は0である。