O'Reilly logo
live online training icon Live Online training

Bash Next Steps

Advance your knowledge of the most commonly used technology in tech

Topic: System Administration
Ian Miell

Nearly all software engineers working on a Mac or Linux machine use bash on a daily basis, for tasks such as writing CI/CD pipelines, managing Kubernetes clusters, writing maintenance scripts, and initializing cloud virtual machines. Unfortunately bash is often not taken seriously as a tool, which leads to confusion and misuse that can baffle users.

Join expert Ian Miell to build the foundation necessary to write more sophisticated and robust scripts. You’ll explore many of bash’s more advanced features, including job management, subshells, traps and signals, and process substitution. Along the way, you’ll also dive into debugging and improving others’ scripts.

What you'll learn-and how you can apply it

By the end of this live online course, you’ll understand:

  • How to create robust bash scripts
  • How to set options in your bash shell
  • Key concepts like signals, traps, debugging techniques, and process substitution

And you’ll be able to:

  • Write your own bash scripts
  • Write superrobust scripts that trap exit codes
  • Quickly debug and diagnose problems with other people’s scripts
  • Speed up your scripts significantly by using little-known bash features

This training course is for you because...

  • You’re a software engineer.
  • You want to build on your bash knowledge.
  • You want to become a senior engineer.


  • A computer with access to a bash shell via any standard terminal program
  • Familiarity with the command line
  • A basic understanding of bash (equivalent to the concepts covered in Introduction to the bash Shell)

Recommended preparation:

  • Answer the following questions in note form: What tasks would you like to solve using bash? What bash features or applications are of particular interest to you?

Recommended follow-up:

About your instructor

  • Ian Miell has over twenty years' experience in IT, writing, running, architecting, and maintaining software for some of the world's busiest systems.

    He has written the book 'Docker in Practice' (published by Manning), 'Learn Bash the Hard Way' (published on Leanpub), as well as various training courses and videos.


The timeframes are only estimates and may vary according to how the class is progressing

Bash scripting: Part 1 (55 minutes)

  • Group discussion: What do you want to do with bash? What’s your experience with bash?
  • Presentation: Basic variables; globbing; pipes and redirects; functions; tests; loops; command substitution; scripts and startup; bash options
  • Hands-on exercise: Write a script to retrieve the output of a site in a loop; output whether a keyword was seen on the page
  • Q&A

Break (5 minutes)

Bash scripting: Part 2 (55 minutes)

  • Presentation: Subshells; IFS; backgrounding tasks
  • Hands-on exercise: Write a script that searches through subfolders looking for files that match a grep; use subshells and IFS where appropriate
  • Q&A

Break (5 minutes)

Advanced bash (50 minutes)

  • Presentation: Traps and signals; process substitution
  • Hands-on exercise: Write a script that’s as difficult as possible to quit from

Wrap-up and Q&A (10 minutes)