Linux Labs· Linux FoundationsLab 4 of 26

Write Your First Bash Scripts

Start from an empty file and end with two small commands of your own: one that counts matching lines in a log and one that turns that count into an alert, with arguments, tests, error messages and exit codes done properly.

  • Beginner
  • 30 min
  • Not rated yet
  • A real environment in your browser
  • You run the commands yourself
  • Your result is checked automatically

In this moduleLinux Foundations

  1. Find Answers on the Machine Itself25 min
  2. Become Another User with su and sudo25 min
  3. History, Aliases, and Shell Startup Files30 min
  4. Write Your First Bash ScriptsYou are here
  5. Bash Scripts That Loop Over Input30 min