Each of us had a situation, where we had to invoke a few, same commands each time. Making it once is not that problematic, but when we are supposed to repeat given operations, it may be better just to create one function that will handle it all.
Sometimes we want to store some piece of information while using a terminal, for example, a result of an executed command. We usually save it into some temporary file which is going to be deleted after all. There’s a better way.