Alter Previous Commands

From Coder Merlin
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Sometimes it's helpful to quickly recall a previous command, alter it slightly, and then execute the altered command. Let's try it:

john-williams@codermerlin:~$  mkdir test_execution_17

Now, let's repeat the command, but rather than using 17 again, let's alter the command to use 18:

john-williams@codermerlin:~$  ^17^18^

The command replaces the previous command's 17 with 18 and reruns the command. This is called quick substitution and is an event designator.

For more information, see this post.