3 ms·
Is !$ the same as $_ ?
by myicgygc843467 5y ago
Is !$ the same as $_ ?
- johncoltrane 5y agohttps://stackoverflow.com/questions/41385015/what-is-bang-dollar-in-bash https://stackoverflow.com/questions/41385015/what-is-bang-do...
- tome 5y agoLooks like !$ is a readline feature and $_ is a shell variable?
- yrro 5y agoYes. $_ is documented here: https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Bash-Variables https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.... And !$ is documented here: https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Word-Designators https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash....
- mturmon 5y agoI don't think !$ is properly understood as a readline feature. It's a sh/bash abbreviation. !! -> last whole command !!:1 -> first argument of last command !!:$ -> last argument of last command !$ -> abbreviation for above