This repository contains a structured, beginner-friendly Bash scripting course that progresses from fundamental concepts to building a complete text-based adventure game. The course is designed to be accessible for new programmers while demonstrating clean software-development practices such as modularisation, documentation, and incremental learning design.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0).
This project demonstrates:
- Practical proficiency with Bash scripting
- Ability to design structured curriculum and technical documentation
- Clear progression from simple concepts to a complex final program
- Application of real coding principles in a teaching context
- Use of modular scripts to build toward a larger project
It is suitable as part of a professional portfolio for cybersecurity, IT, software engineering, or digital technologies education.
This course was successfully delivered to Upper Primary students at Brisbane Montessori School in Term 4 (2025), with learners progressing from basic input and conditionals to building and running a complete text-based adventure game. The structure and pacing have been classroom-tested and refined for student engagement and comprehension.
bash-scripting-course/
│
├── lessons/
│ ├── lesson1.sh
│ ├── lesson2.sh
│ ├── lesson3.sh
│ ├── lesson4.sh
│ ├── lesson5.sh
│ ├── lesson6.sh
│ └── lesson7.md
│
├── game/
│ ├── condition.sh
│ ├── game.sh
│ └── combine.sh
│
├── docs/
│ └── bash-scripting.pdf
│
├── README.md
└── LICENSE
| Lesson | Topic | Skills Introduced |
|---|---|---|
| 1 | User Input | read, variables |
| 2 | Conditionals | if, comparisons |
| 3 | Loops | while, break, continue |
| 4 | Functions | Modular code, parameters |
| 5 | Arrays | Storing lists, iteration |
| 6 | Case Statements | Structured branching |
| 7 | Final Project | Combining all concepts |
Each lesson script includes a header comment:
#!/bin/bash
# lessonX of Bash-Scripting-CourseThe final script, combine.sh, includes:
- Rooms and movement (
hall,library) - A key item the player can pick up
- An inventory system
- A number-guessing puzzle
- Modular functions for item handling
- A main
whileloop acting as the game engine
These lessons align with the Years 7–8 Australian Curriculum: Digital Technologies achievement standard and address the following content descriptions through the design, development and refinement of a Bash scripting adventure game.
-
AC9TDI8P04 - Define and decompose real-world problems, considering design criteria and user stories. Students interpret a game brief and break the problem into manageable parts (commands, rooms, rules, win conditions, inventory, and feedback messages). They develop design criteria (e.g., clear prompts, consistent commands, meaningful error messages) and user stories (e.g., “As a player, I want a help command so I can recover when I’m stuck.”).
-
AC9TDI8P07 -Design the user experience of a digital system. Students design and refine a text-based user interface, making deliberate choices about prompt style, command structure, feedback clarity, hinting, and error handling so the game is usable and consistent.
-
AC9TDI8P08 - Generate, modify, communicate and evaluate alternative designs. Students explore and compare different ways to design and implement features of the adventure game. They modify and refine their solutions through testing and iteration, and communicate their design decisions through code structure, comments, and supporting documentation.
-
AC9TDI8P09 - Implement, modify and debug programs involving control structures and functions in a general-purpose programming language. Students implement and refine the adventure game using variables, functions, and control structures including sequence, selection (if, case) and iteration (while, for). They test and debug their programs to identify and correct logic errors, improve reliability, and ensure the game behaves as intended.
-
AC9TDI8P10 - evaluate existing and student solutions against the design criteria, user stories and possible future impact. Students implement a complete text-based adventure game using Bash scripting. The program includes a command-line user interface that accepts user input and provides feedback using branching and iteration to control game flow. Students modify and refine the interface and program logic to improve functionality and usability.
-
AC9TDI8P11 - Select and use a range of digital tools efficiently, including unfamiliar features, to create, locate and communicate content, consistently applying common conventions. Students apply tool-based workflows to develop and manage the project (editing scripts, organising files, setting permissions, running and testing from the terminal, and documenting usage). They apply consistent conventions such as readable naming, structured folders, comments, and clear in-program help text.
Make scripts executable:
chmod +x lesson3.sh
./lesson3.shRun the final adventure game:
chmod +x combine.sh
./combine.shCreative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
Bradley Mavin 2025 www.mavinmusicmethod.com