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.
$ touch a $ touch b $ touch c # [up] [up] [up] $ touch a [C-o] $ touch b [C-o] $ 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!