Difference between revisions of "Tip 16: Fast command history in bash"

From Vlsiwiki
Jump to: navigation, search
(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...")
 
(No difference)

Latest revision as of 22:24, 24 July 2014

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/