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 `!!`
Written by Artur Nowak
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Related Tags
#bash
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#