help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Order of command substitution and arithmetic expansion


From: Dongbo Hu
Subject: Order of command substitution and arithmetic expansion
Date: Sat, 13 Nov 2021 07:48:14 -0500

The Bash reference manual claims that of the seven kinds of shell
expansions, "arithmetic expansion" is done before "command substitution":
https://www.gnu.org/software/bash/manual/bash.html#Shell-Expansions
Quote: "The order of expansions is: brace expansion; tilde expansion,
parameter and variable expansion, arithmetic expansion, and command
substitution (done in a left-to-right fashion) ..."

But I feel that "arithmetic expansion" is done AFTER "command substitution".

If the manual is correct, it would make more sense to cover "arithmetic
expansion" before "command substitution" in the manual.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]