Last active
August 29, 2015 14:09
-
-
Save Rachitlohani/018b7992f356a8774ab5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The order is (from first to last): | |
Brace expansion | |
Tilde expansion | |
The following expansions happen at the same time, in a left-to-right fashion on the commandline (see below) | |
Parameter expansion | |
Arithmetic expansion | |
Command substitution | |
Word splitting | |
Pathname expansion | |
Process substitution is performed simultaneously with parameter expansion, command substitution and arithmetic expansion. It is only performed when the underlying operating system supports it. | |
The 3 steps parameter expansion, arithmetic expansion and command substitution happen at the same time in a left-to-right fashion on nthe commandline. This means | |
i=1 | |
echo $i $((i++)) $i | |
will output 1 1 2 and not 1 1 1. | |
URL : http://wiki.bash-hackers.org/syntax/expansion/intro |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment