0

I'm trying to add an alias to my .bashrc alias oops='sudo !!' when i execute it however I get:

sudo: !!: command not found

eliminating the alias from the .bashrc and im able to manually use sudo !!, why does this happen?

Eduardo Diaz
  • 13
  • 1
  • 1
  • 7

1 Answers1

-2

Try with:

alias oops='sudo $(history -p !!)'
terdon
  • 234,489
  • 66
  • 447
  • 667
Zumo de Vidrio
  • 1,703
  • 1
  • 13
  • 28