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 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.