Jump-starting 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, then use the session history to help build the script for you.

Figure 10.3. You can enter a series of commands, then use the code provided with history to help create a shell script.

To jump-start your script with history:

1.
Go through the process that you want to include in the script. We'll wait.
2.
Keep a rough count of the commands ...

Get Unix: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.