/usr/bin/dash: Difference between revisions

Line 473: Line 473:


=== Command Substitution ===
=== Command Substitution ===
    Command substitution allows the output of a command to be substituted in place of the command name it‐
コマンド置換では、コマンド名の代わりにコマンドの出力を置換することができる。 コマンド置換は、コマンドが以下のように囲まれているときに行われる:
    self.  Command substitution occurs when the command is enclosed as follows:


           $(command)
           $(command)
Line 482: Line 481:
           `command`
           `command`


    The shell expands the command substitution by executing command in a subshell environment and replac‐
シェルは、サブシェル環境でコマンドを実行し、コマンドの標準出力でコマン ド置換を置き換えることで、コマンド置換を展開し、置換の最後にある1つ以上の ⟨改行⟩のシーケンスを削除する。 (出力の末尾の前に埋め込まれた⟩は削除されないが、フィールド分割の際に、有効なIFSとquotingの値によっては、⟨space⟩に変換されることがある)
    ing the command substitution with the standard output of the command, removing sequences of one or
    more ⟨newline⟩s at the end of the substitution.  (Embedded ⟨newline⟩s before the end of the output are
    not removed; however, during field splitting, they may be translated into ⟨space⟩s, depending on the
    value of IFS and quoting that is in effect.)


=== Arithmetic Expansion ===
=== Arithmetic Expansion ===