GL375 · 3 days · 6+ hrs hands-on labs

Shell Scripting Workshop

Available for RHEL· SLES

Master Bash shell scripting in this lab-intensive workshop designed for Linux professionals who need to automate system tasks, process text data, and build reliable command-line tools. Starting with shell fundamentals and progressing through advanced defensive scripting techniques, students gain practical skills they can apply immediately to real-world administration and DevOps workflows.

The curriculum covers variables, quoting, and command substitution before advancing into I/O redirection, piping, and here documents. Students build proficiency with regular expressions using grep and sed, then learn the awk programming language for structured data processing. Flow control topics include conditionals, loops, case statements, functions, and command-line option parsing with getopts. The final chapter tackles production scripting concerns: error handling with set and trap, locale-aware scripting, whitespace safety, IFS manipulation, and secure coding practices.

With 24 hands-on lab exercises across seven chapters, every concept is reinforced through guided scripting practice on live Linux systems. Students write, debug, and refine scripts of increasing complexity, building a scripting toolkit they can take back to their organizations.

Who Should Attend

System administrators, DevOps engineers, site reliability engineers, and Linux professionals who work at the command line and need to automate repetitive tasks, build reliable scripts, and process structured text data efficiently.

Skills You'll Gain

Write and execute Bash shell scripts using shebangs, comments, and proper file permissions
Use positional parameters, special variables, and the read command to handle script input
Manage shell and environment variables, quoting rules, and command substitution
Redirect STDIN, STDOUT, and STDERR using file redirection, pipes, here documents, and tee
Construct basic and extended regular expressions for pattern matching with grep and sed
Implement conditional logic using test, if/elif/else, and case statements
Build iterative scripts using for, while, until, and select loops with getopts option parsing
Process and transform structured text data using awk, cut, sort, and uniq
Define reusable Bash functions with local variable scope and POSIX-compatible syntax
Schedule automated tasks with cron, crontab, and anacron
Apply defensive scripting techniques including set -euo, signal trapping, and proper variable quoting
Diagnose common scripting pitfalls involving whitespace, IFS, locales, and alias interference

Chapters & Labs

20 labs · 6+ hours hands-on
  1. Introduction to the Shell 3 labs · 20 min
  2. Shell Scripting Basics 3 labs · 25 min
  3. Working with Files 2 labs · 25 min
  4. Regular Expressions 1 lab · 10 min
  5. Branching and Looping 2 labs · 60 min
  6. Data Munging 4 labs · 120 min
  7. Security, Whitespace, and Other Gotchas 3 labs · 50 min

Appendices

  • Challenge
  • Emacs
  • The Secure Shell (SSH)

Prerequisites

Proficiency with the Linux command line, including file management, text editing, and basic command usage. GL120 (Linux Fundamentals) or equivalent experience required.