3 ms·
https://stackoverflow.com/questions/41385015/what-is-bang-dollar-in-bash https://stackoverflow.com/questions/41385015/what-is-bang-do...
by johncoltrane 6y ago
https://stackoverflow.com/questions/41385015/what-is-bang-dollar-in-bash https://stackoverflow.com/questions/41385015/what-is-bang-do...
- tome 6y agoLooks like !$ is a readline feature and $_ is a shell variable?
- yrro 6y 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 6y 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