Skip to content
Hands-on IT IT Drills
Cover: Shell scripting hands-on

Training material

Shell scripting hands-on

Bash from your first script to production

A toolbox for the notes app grows day by day – exit codes and strict mode, quoting, functions and arrays, log analysis with grep, sed and awk, JSON with curl and jq, backups with trap, flock and rotation, tests with bats, ShellCheck and shfmt in CI, signals, cron, systemd timers and ssh.

  • Bash
  • awk
  • jq
  • bats
  • ShellCheck
  • systemd

Training plan

  1. Foreword
  2. Day 0: The Training Ground
  3. Day 1: The First Script
  4. Day 2: Variables, Quoting, Parameter Expansion
  5. Day 3: Conditions and Loops
  6. Day 4: Functions and a Library
  7. Day 5: Arrays and Options
  8. Day 6: grep, cut, sort, uniq
  9. Day 7: sed and awk
  10. Day 8: curl and jq
  11. Day 9: find, xargs, mktemp
  12. Day 10: Error Handling, Locks, Backup
  13. Day 11: ShellCheck, shfmt, bats
  14. Day 12: Processes and Signals
  15. Day 13: cron and systemd Timers
  16. Day 14: Several Servers with ssh and rsync
  17. Day 15: Competition – Disaster Drills
  18. Appendix A: Cheat Sheet
  19. Appendix B: Final Exam