!gre # will run the last command starting with gre (so probably grep)
If you type history, then !<number to the left of the history command>, the shell will execute that command. $ history # shows command history
$ !200 # executes command 200