TechnologyThe ProfessorBeginner
Writing Bash Scripts, a free technology course on Tomo

Writing Bash Scripts

Stop repeating manual terminal commands and let your computer do the heavy lifting. Learn to write clean, reliable Bash scripts that automate daily tasks, process text, and handle errors safely.

Like Duolingo, but for Writing Bash Scripts. Tomo turns the whole topic into a game you play five minutes a day, until it actually sticks.

22 levels across 3 sections, about 44 minutes end to end, roughly 9 days at five minutes a day. It moves through Making Commands Run Themselves, Controlling Logic and Repetition, and Structuring and Hardening Scripts. It starts from scratch.

22 bite-size levelsAbout 5 minutes each

Free forever · No credit card · iPhone & Android

Buster the Badger, the guide who teaches the Writing Bash Scripts course
Writing Bash Scripts
with Buster the Badger
22
Levels
3
Sections
5
Min/day
What you'll learn

Key ideas in Writing Bash Scripts

  • A Bash script executes the exact same commands you would type by hand in the terminal
  • Commands inside a Bash script run sequentially from top to bottom
  • The shebang sequence '#!' must sit on line 1 with no leading spaces
  • The shebang tells the operating system which program (like /bin/bash) should interpret the rest of the file
  • Newly created text files lack execute permission by default
  • Running 'chmod +x' grants the file execute permissions so the system treats it as a runnable program
  • The shell only searches predefined system directories in PATH unless given an explicit path
  • The dot-slash './' explicitly specifies the current directory as the location of the file to run
  • Bash ignores text on a line following a '#' symbol
  • Useful comments explain 'why' a command does something or what edge case it handles, not simply re-stating what the command syntax does
  • Bash requires no spaces directly before or after the equals sign during assignment
  • Adding spaces around the equals sign makes Bash interpret the variable name as an executable command
  • Values are treated as plain text strings by default in Bash assignments
  • Referencing a variable name alone prints or uses the literal name string
  • Prefixing the name with '$' tells Bash to evaluate and substitute the stored value
  • Echoing without '$' will just print the word USER
Why not just Google it

You've tried the other tabs

Wikipedia

Thirty open tabs. Four facts you actually kept.

YouTube

You watched. You nodded. By Sunday it was gone.

ChatGPT

One answer, then back to scrolling.

Online courses

Eight weeks. You meant to finish. You didn't.

Tomo gives Writing Bash Scripts the Duolingo treatment: levels, streaks, and quick quizzes that test what you just learned. That game loop is what the tabs above never had, so it's the one you actually finish.

Try a question

Here's what playing it feels like

A real question from this course. Take your best guess.

Writing Your First Bash Script

In what order does your computer run the commands listed inside a script?

Get it right to open this lesson and 21 more in the app.

Course map

How to learn Writing Bash Scripts, step by step

Go in order. 22 short levels across 3 sections, about 44 minutes in all, five minutes a day.

  1. 1

    Making Commands Run Themselves

    • Your First Runnable Script
    • Storing and Using Data in Variables
  2. 2

    Controlling Logic and Repetition

    • Branching Logic with Conditions
    • Looping Over Files and Lists
  3. 3

    Structuring and Hardening Scripts

    • Organizing Code with Functions
    • Managing Streams and Pipelines
    • Defensive Scripting and Safe Failures

3 sections · 7 units · 22 levels. Built to play, not to enroll.

Questions

Questions about Writing Bash Scripts

  1. How do I learn Writing Bash Scripts?

    Go in order: start with Making Commands Run Themselves, then Controlling Logic and Repetition, then Structuring and Hardening Scripts. On Tomo that's 22 short levels, about 44 minutes in all, played five minutes a day. Start free and play the first level in under a minute.

  2. Is there a Duolingo-style app for Writing Bash Scripts?

    Yes. Tomo works like Duolingo: short daily lessons, streaks and quick quizzes. Writing Bash Scripts is one of its free courses, and you can type any other topic to get a course of your own.

  3. Is the Writing Bash Scripts course free?

    Yes. Writing Bash Scripts is playable on Tomo's free plan, which doesn't expire. No credit card, no waitlist. Download the app and start your first lesson.

  4. How long does it take to learn Writing Bash Scripts?

    22 levels across 3 sections, about 44 minutes of play in total. It's built for five minutes a day, so you finish it a little at a time instead of all at once.

  5. Do I need any background to start Writing Bash Scripts?

    No. It's pitched at a beginner level, so it starts where you are and builds up. If you can tap a phone, you can start.

New

Tomo is in ChatGPT

Tomo is also a ChatGPT plugin: the same playable courses, built and played inside your chat.

Add Tomo to ChatGPT
How it's taught

You pick the voice

This course
The Professor

Writing Bash Scripts is taught in the Professor style: clear, structured, thorough. Want a different feel? In the app you can spin up the same topic in any of Tomo's teaching styles. Same facts, totally different vibe.

Keep going

More Technology on Tomo

Start free

Start Writing Bash Scripts today.

Download Tomo, search Writing Bash Scripts, and play your first lesson in under a minute.