Summary

After reading this chapter, you should now be confident enough to write an effective shell script by using conditional statements, loops, and so on. Now, you can also write a modular and reusable code using the function in shell. Having the knowledge of exit code will help in knowing whether the command was executed successfully or not. You should also know a few more useful shell builtins such as alias, pushd, and popd.

In the next chapter, we will learn more about modularizing our script by knowing how to write a reusable shell script itself, which can be used in shell scripts. We will also see how we can debug our shell scripts to fix problems.

Get Linux Shell Scripting Essentials 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.