DEV Community

Discussion on: How do *you* pronounce sudo?

Collapse
 
sidhantpanda profile image
Sidhant Panda

I've added the following alias

alias please='sudo $(fc -ln -1)'
Enter fullscreen mode Exit fullscreen mode

So now,

~$ bash ./helloworld
bash: ./helloworld: permission denied
~$ please
Hello World!
Enter fullscreen mode Exit fullscreen mode

Source twitter.com/zzaaho/status/11608251...

Collapse
 
martinwallgren profile image
Martin Wallgren

The previous command can be found in !!

alias please='sudo !!'
Collapse
 
sgcdialler profile image
sgcdialler

If only there were a way to change 'permission denied' to 'ask nicely'!

Collapse
 
arximughal profile image
Muhammad Arslan Aslam

I can say that I've successfully wasted an hour looking to see if this was possible!