Tip 16: Fast command history in bash

From Vlsiwiki
Revision as of 22:24, 24 July 2014 by Mrg (Talk | contribs) (Created page with " Run the last command again: !! Run command 423 in your history buffer (type history to see the list): !423 Run the last command that starts with grep: !grep Run the las...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Run the last command again:

!!

Run command 423 in your history buffer (type history to see the list):

!423

Run the last command that starts with grep:

!grep

Run the last command but substitute the first occurence of arg1 with arg2:

^arg1^arg2

Run the last command but substitute ALL occurences of arg1 with arg2:

!:gs/arg1/arg2/