Last Updated: February 25, 2016
·
722
· anowak

Use the result of the last command

You can use !! to reference the last command executed in bash. As exclamation mark is close to backtick on the keyboard, it makes up for a quick shortcut `!!` for using the result of the last command in the next one. For example:

$ rgrep -l foobar .
./README
$ vi `!!`