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.
Free forever · No credit card · iPhone & Android

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
You've tried the other tabs
Thirty open tabs. Four facts you actually kept.
You watched. You nodded. By Sunday it was gone.
One answer, then back to scrolling.
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.
Here's what playing it feels like
A real question from this course. Take your best guess.
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.
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
Making Commands Run Themselves
- Your First Runnable Script
- Storing and Using Data in Variables
- 2
Controlling Logic and Repetition
- Branching Logic with Conditions
- Looping Over Files and Lists
- 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 about Writing Bash Scripts
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.
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.
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.
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.
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.
Tomo is in ChatGPT
Tomo is also a ChatGPT plugin: the same playable courses, built and played inside your chat.
Add Tomo to ChatGPT- What to ask
- “Make me a Tomo course on black holes.” “Turn this chat into a Tomo course.”
- What you get
- Quick questions with instant feedback, hearts and stars, ready to play in about a minute.
- Where it goes
- No sign-up to start. Connect your Tomo account and your streak carries on in the app.
You pick the voice
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.
More Technology on Tomo
Writing Code with Python
Turn plain text into working programs that calculate, automate, and solve real problems. Learn how to direct computer logic, work with collections of data, and build reusable scripts.
Writing Your First Python Scripts
Build a working intuition for the world's most popular programming language. Learn how Python stores information, makes decisions, and automates repetitive tasks with clean, readable code.
Python from Scratch
Learn to write real, working Python code to automate repetitive tasks, analyze information, and build your own applications. Master core syntax, data structures, and practical libraries through hands-on logic.
Python: Writing Useful Scripts
Learn how to write real, functioning Python code to automate tedious tasks and crunch everyday numbers. Build confidence step-by-step from your first variable to clean, reusable custom functions.
Thinking in Code
Learn how to command computers and build working software from scratch. Discover the core mechanics of programming, from simple step-by-step instructions to data structures and debugging.
Python Programming for Beginners
Stop reading about code and start writing it. Build your first programs immediately and learn how to think like a developer to solve real-world problems.
Start Writing Bash Scripts today.
Download Tomo, search Writing Bash Scripts, and play your first lesson in under a minute.