Getting a Head Start on Scripts with history
If you find yourself performing a particular process over and over again, consider making that process into a script. An easy way to create a script is to work from the session history, as shown in Figure 10.3. Basically, all you have to do is complete the procedure one time, and then use the session history to help build the script for you.
Figure 10.3. You can enter a series of commands, and then use the code provided with history to help create a shell script.
To Get a Head Start on Your Script with history: