Linux Shell Scripting
Knowing how to use the basics of Linux shell programming and the command-line interface (CLI) is essential for a modern-day Linux professional.
In this chapter, you will learn how to use the Linux shell’s programming capabilities to automate different tasks in Linux. You will learn about the structure of a basic Linux shell script and how it is organized and executed. We’ll explore most of the commands already available to you from the previous chapters, especially the ones for working with files and directories and input and output redirection. Along the way, we’ll introduce you to writing scripts, the structure and complexity of shell programming, and how to use specialized tools such as sed
and gawk
. We hope that by the end of this chapter, you’ll be comfortable using scripts in your day-to-day workflow and be ready for future, more advanced explorations.
We’re going to cover the following main topics:
- Introducing...