Why does the '!!' shortcut fail to execute the previously run command?
History expansion might be disabled:
$ echo foo
foo
$ !!
echo foo
foo
$ set +o histexpand
$ set -o | grep hist
histexpand off
history on
$ echo foo
foo
$ !!
bash: !!: command not found
Try set -H
or set -o histexpand
.