Chapter 19. Shell Scripts

Shell scripts are text files containing commands. The use of commands at the command-line interface is explained in Chapter 7, including their syntax and capabilities. The same commands, using the same syntax, can be stored in a shell script. When you run the script, the commands are executed, one by one, starting from the beginning, just as if you were typing them directly into the shell yourself, one by one. Often you can save yourself a great deal of typing by putting commands you enter frequently into shell scripts.

Shell scripts are often used to perform routine system maintenance tasks. For instance, you might write a shell script that backs up specific files to another computer on your network. Or you might want ...

Get Spring Into Linux® 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.