Skip to content

Bash Fundamentals

Quoting, pipes and redirection — and why a filename with a space breaks a script.

10 lessons · about 78 minutes

What you'll go through

  • 01The third time you type the same five commands7 min
  • 02The variable that was empty and nobody noticed8 min
  • 03The script that breaks when a filename has a space8 min
  • 04Why the wildcard matched a file you did not expect8 min
  • 05You redirected the output and the errors still appeared8 min
  • 06The script said it succeeded and nothing had happened8 min
  • 07The if that was true when the file did not exist8 min
  • 08The loop that processed 200 files and skipped four8 min
  • 09Someone ran your script with no arguments7 min
  • 10The script you can leave running unattended8 min