title: Save current shell history and recover it afterwards
body: <p>Sometimes I work very intensively using a certain set of commands in the bash shell and then I spend some days working in a very different one. The problem is that by the time I want to keep going with the first set of tasks the shell history has been totally overwritten by the last one and I spend some time figuring out what I was exactly doing (I lack long-term memory).</p>
  
  <p>I usually keep a journal so I can go back and continue where I stopped the last time, but I was wondering if there exists an easy way to do some "time travelling" in my shell session by saving the recent shell history (say, the last 100 commands) to a file and using this file to overwrite the history in the future.</p>