Stage 2 · Lesson 3 of 9
Wildcards and quoting
Before a command runs, the shell expands patterns into real file names. This is called , and the special characters are wildcards. * matches any characters, ? matches exactly one, and [abc] matches one of a set.
So *.md turns into the list of all files in the folder. Braces build lists too: mkdir {src,tests,docs} makes three folders. controls all of this.
Single quotes keep text exactly as written. Double quotes still fill in variables such as $HOME. A backslash protects a single character.
A file name with a space needs quotes, or the shell splits it into two separate . Understanding this explains many "file not found" errors.
Common trapleaving variables unquoted in scripts, so a name with a space breaks the command.
A question to check yourself, an AI practice session and 2 cheat sheet entries come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT's lectures on the shell and shell tools, with exercises after each one
- BookFreeThe Linux Command Line
William Shotts · Beginner
A free book that explains the shell step by step; the first part covers this whole stage
Practise
Keep handy
Also worth your time
- roadmap.sh: Shell / BashGo deeper
The full map of shell and Bash topics, to see what comes after the basics