Working with Functions

In the last chapter, you learned about using decision-making in scripts by working with test, if-else, and switch case. We also used select for loop with menu. For repeated tasks, such as processing lists, you learned to use the for and while loops and the dowhile. You also learned about how to control loops using the break and continue statements.

In this chapter, you will learn the following topics:

  • Writing a new function and calling
  • Sharing data between functions
  • Passing parameters to functions
  • Creating a library of functions

Get Learning Linux Shell Scripting - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.