Timeline for Assigning command to variable without alias
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:36 | history | edited | Community Bot |
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
|
|
Jun 29, 2016 at 4:17 | vote | accept | sylye | ||
Jun 27, 2016 at 8:30 | comment | added | Kusalananda♦ |
@sylye Well, parameter expansion needs to happen before command substitutions, otherwise the somecommand in a=$( somecommand $var ) would get the wrong argument. I just wanted to point out that there are stages that the command line goes through before it is actually executed, and different things happen in different stages. See the bash manual and look for the "EXPANSION" heading.
|
|
Jun 27, 2016 at 8:18 | comment | added | sylye | I see, now I got it :) Btw, what do you mean by "shell treats most type of "substitution" differently, and at different stages of processing the command line" ? | |
Jun 27, 2016 at 7:14 | comment | added | Kusalananda♦ | @sylye Also note that the shell treats most type of "substitution" differently, and at different stages of processing the command line. "Parameter expansion" and "alias expansion" is done differently. | |
Jun 27, 2016 at 7:08 | comment | added | Kusalananda♦ | @sylye I have updated my answer. | |
Jun 27, 2016 at 7:07 | history | edited | Kusalananda ♦ | CC BY-SA 3.0 |
added 25 characters in body
|
Jun 27, 2016 at 6:42 | history | edited | Kusalananda ♦ | CC BY-SA 3.0 |
added 25 characters in body
|
Jun 27, 2016 at 6:34 | comment | added | sylye |
Thanks. So this actually does what alias did, is it ? Any special reason this method is not being mentioned when same question being asked a few times in Stackexchange, for example this one, [unix.stackexchange.com/questions/121418/… ?
|
|
Jun 27, 2016 at 6:24 | history | answered | Kusalananda ♦ | CC BY-SA 3.0 |