Hacker News new | ask | show | jobs
by schoen 1514 days ago
There is also "!!" for the entire prior command line. Someone elsewhere in this thread mentioned the usefulness of

  sudo !!
for "run the entire previous command under sudo".

Another example could be

  echo "!!" > myscript
for "save the previous command into the file myscript".
1 comments

I also use cat `which !!` every once in a while