What Bash Is, and Why Script It
Bash is a shell that reads command lines and runs programs, and a script is a text file of those same commands that Bash reads from top to bottom.
Identify a repeatable command-line task and the environment a script relies on.
Every Friday you open a terminal, make a backups folder, pack your notes into an archive with today's date in the name, and list the folder to check it worked. It takes a minute, and sooner or later you mistype the date. Bash can type those lines for you, the same way every time.
The rule
If you typed it twice, a script can type it forever.
A shell is the program behind your terminal prompt. It reads the line you type, finds the program you named, runs it with the arguments you gave, and waits for the next line. Bash (the "Bourne Again SHell") is the most widely used shell: the default on most Linux systems, and present on macOS even though macOS now opens zsh by default. Others you will meet are sh/dash (small and strict), zsh and fish (friendly for typing), and PowerShell on Windows.
The command line (CLI) and a graphical interface (GUI) are good at different things. A GUI helps you discover: you see the options and point at things. A CLI helps you repeat and combine: a command is text, so it can be saved, copied, and run again on a thousand files.
A script is a plain text file of commands. Bash reads it from the top, one command at a time, exactly as if you were typing each line. Here are the Friday commands you would type by hand:
mkdir -p ~/backups
tar -czf ~/backups/notes-2026-09-25.tar.gz ~/notes
ls ~/backupsSaved in a file, these three lines are the first version of backup.sh, the script you will grow throughout this course.

