🐚 Shell Script
Learn Shell Script from the Basics
Shell scripting — gathering the commands you type in a terminal into a file you can run — taught from the ground up across 20 lessons. Each lesson checks whether what you typed matches the reference code, giving you instant feedback without ever leaving the page.
What is Shell Script used for?
A shell script automates work you would otherwise do by hand in a terminal. bash ships with practically every Mac and Linux machine, so there is nothing to install before you start. Server maintenance, deployment, log analysis, CI pipelines — shell scripting sits underneath all of it, which makes it one of the most directly useful skills an infrastructure or backend engineer can pick up.
Common uses & related roles:
- Server operations and maintenance automation
- Deployment and CI/CD pipelines
- Log analysis and batch processing
- Infrastructure/SRE engineer
🐚Shell Script Lessons
- 01Setting up (what you'll need)
- 02Your first shell script (echo)
- 03Using variables
- 04Command-line arguments ($1, $2 ...)
- 05Branching (the if statement)
- 06Repeating (the for loop)
- 07Repeating (the while loop)
- 08Writing your own function
- 09Working with arrays
- 10Command substitution ($())
- 11Working with strings (parameter expansion)
- 12Reading from standard input (read)
- 13Exit status and && / ||
- 14Pipes and redirection
- 15The case statement
- 16Arithmetic ($(( )))
- 17The basics of grep, sed and awk
- 18Argument checks and error handling
- 19Function return values and exit codes
- 20[Project] Build a small log-tallying script
Ad space (in-article)
