Writing Shell Scripts

In this chapter, you will learn about

•   Advanced shell concepts

•   Understanding shell script components

•   Using control operators

•   Processing text streams

Software is supposed to serve the human and not the other way around

—Gloria Washington, Howard University

This chapter covers how to create and control basic shell scripts on a Linux system. Shell scripts are text files that contain a variety of commands that can be used to automate tasks and process information. Scripts have features of many programming languages, including variables, operators, conditionals, looping, and more. Because these features are related to the Bash shell, details are found in the bash man page.

NOTE   Most of the scripts ...

Get CompTIA Linux+ Certification All-in-One Exam Guide, Second Edition (Exam XK0-005), 2nd Edition 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.