/usr/bin/dash: Difference between revisions

Line 493: Line 493:


=== Arithmetic Expansion ===
=== Arithmetic Expansion ===
    Arithmetic expansion provides a mechanism for evaluating an arithmetic expression and substituting its
算術展開は、算術式を評価し、その値を代入するメカニズムを提供する。 算術展開の書式は以下の通りである:
    value.  The format for arithmetic expansion is as follows:


           $((expression))
           $((expression))


    The expression is treated as if it were in double-quotes, except that a double-quote inside the ex‐
式は二重引用符で囲まれているかのように扱われるが、式の中の二重引用符は特別に扱われない。 シェルは、パラメータ展開、コマンド置換、引用符除去のために、式のすべてのトークンを展開する。
    pression is not treated specially.  The shell expands all tokens in the expression for parameter ex‐
    pansion, command substitution, and quote removal.


    Next, the shell treats this as an arithmetic expression and substitutes the value of the expression.
次に、シェルはこれを算術式として扱い、式の値を代入する。


=== White Space Splitting (Field Splitting) ===
=== White Space Splitting (Field Splitting) ===