Re:Show HN: ALL_CAPS => sudo all_caps (Bash)
by nfriedly on Monday October 21, 2019 @09:33AM
(#21312039)
FYI, in bash, "sudo !!" re-runs the previous command with sudo.
[ Parent
| on HN ]
Re:Show HN: ALL_CAPS => sudo all_caps (Bash)
by papln on Monday October 21, 2019 @11:43AM
(#21313557)
That's not "funny" enough, unless the "!!" is replaced by an emoji.
Re:Show HN: ALL_CAPS => sudo all_caps (Bash)
by anoncake on Tuesday October 22, 2019 @04:32AM
(#21321401)
papln used multiple exclamation marks and is clearly insane. This incident will be reported.
Re:Show HN: ALL_CAPS => sudo all_caps (Bash)
by toyg on Monday October 21, 2019 @11:56AM
(#21313725)
alias goddammit=sudo !!
Re:Show HN: ALL_CAPS => sudo all_caps (Bash)
by blacksmith_tb on Monday October 21, 2019 @07:27PM
(#21318720)
I use it all the time! But also worth remembering that !$ is the object of your last command, so you could do something like
cp /some/tortured/path/to/file.txt /some/other/path/file.txt
chown myuser:myuser !$