Examples of running a command from the history list

1. To run the previous command:

   pwd
   /u/user/eucs/joe
   r
   pwd
   /u/user/eucs/joe

2. To re-run a command from the history list:

   r 15

This re-runs command number fifteen from the history list.

3. To re-run the most recent command that starts with a particular string:

   r grep
   grep -n '[dD]on't' tasks \ less

This re-runs the most recent command that starts with the string grep.