Re:Mastering Bash and Terminal (2017)
by klysm on Friday December 10, 2021 @05:25PM
(#29516197)
Surprised not to see a mention of “!!” here, I use that a decent amount
[ Parent
| on HN ]
That's one I forgot to mention but I do use it a lot. I don't know if you know this but you can also do a substitution on the previous command. I often do something like `ssh root@proxmox01` and then `!!:s/1/2` which runs it again, but substitutes 1 for 2 and executes `ssh root@proxmox02`.
edit: I realize that example fails the speed test vs `ctrl+p, backspace, 2, enter`, but hopefully you can see the value.
could that just be shortened down to ^1^2?