I recently found a cool command in BASH that I hadn’t previously known. C-o will execute the current line, and then bring the following line up from BASH history. If you have a set of commands you want to execute again, rather than having to press up 20 times, hit enter, press up 19 times, hit enter, and so on… You can just hit up 20 times. Press C-o as many times as you need to.
tacidsky@ip-234:~$ touch a
tacidsky@ip-234:~$ touch b
tacidsky@ip-234:~$ touch c
[up] [up] [up]
tacidsky@ip-234:~$ touch a [C-o]
tacidsky@ip-234:~$ touch b [C-o]
tacidsky@ip-234:~$ touch c [C-o]
As you can see there, all I had to do was go back to the `touch a` line, and hit control-o three times and it touched the files again!