Dualo
All themes
🐚

Bash / Shell Scripting

From your first `ls` to production-grade scripts: the 10 concepts that make you fluent in Unix shells — pipes, quoting, control flow, text processing, and safe scripting.

Progress0 / 10
1

What is Bash?

A command interpreter and scripting language — the glue of Unix systems. You type commands; it runs programs, pipes data, and automates tasks.

2

Shell basics — navigation & files

The core commands you use every day: moving around the filesystem, listing, reading, copying, and inspecting files.

3

Pipes & redirections

Connect the output of one command to the input of another (`|`), or send it to a file (`>`, `>>`). The core composition tool of Unix.

4

Variables & quoting

Store values, interpolate them, and — most importantly — quote them to survive spaces, globs, and special characters.

5

Control flow — if, for, while, case

Branch on exit codes, loop over lists or streams, match patterns. Bash control flow is quirky — exit code 0 means true.

6

Functions & arguments

Group commands into reusable units, accept positional parameters, and return exit codes. Not quite like functions in 'real' languages.

7

Globbing & expansions

Wildcards for filenames, brace expansion for lists, parameter expansion for string ops. The shell rewrites your command line before running it.

8

Text processing — grep, sed, awk, cut, sort, uniq

The Unix data-wrangling toolkit. Compose these with pipes and you solve 90% of log/CSV/text tasks without writing a real program.

9

Scripts, shebang & safe defaults

A script is a file of commands. The shebang picks the interpreter; `set -euo pipefail` turns silent bugs into loud failures.

10

Signals, jobs & processes

Run commands in the background, wait on them, and handle Ctrl-C gracefully. The runtime side of shell scripting.