O'Reilly logo

Linux with Operating System Concepts by Richard Fox

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7

Shell Scripting

This chapter’s learning objectives are

  • To be able to write Bash shell scripts
  • To know how to use variables and parameters in shell scripts
  • To be able to write input and output statements in shell scripts
  • To understand and write conditional statements in Bash
  • To be able to properly apply selection statements in shell scripts
  • To be able to properly apply loop statements in shell scripts
  • To understand how to use arrays and string operations in Bash
  • To understand the role of the function and be able to write and call functions in Bash
  • To understand the differences between Bash and C-shell scripts

7.1 Introduction

Most computer programs are written in a high-level language (e.g., C++, Java) and then compiled into an executable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required