Linux [Electronic resources]

Janet Valade

نسخه متنی -صفحه : 357/ 256
نمايش فراداده

Summary

Shell scripts are text files containing commands, the same commands you can use at the command-line interface discussed in Chapter 7. When you run the script, the commands are executed, one by one, starting from the beginning to the end. Shell scripts are useful to automate repetitive tasks.

This chapter describes the syntax for writing shell scripts, including how to:

  • Create a shell script

  • Use variables and arrays

  • Use special characters

  • Control the flow of the script using conditional statements and loops.

  • Schedule shell scripts to run at specified times

Chapter 7 describes how to write commands. Appendix B provides a reference to the most useful commands.