Linux › Section K · Shell scripts › Topic K.1
Script basics, quoting, and literals
A shell script is a file of the same commands you type at the prompt, saved so that it can run as a program. Most of the bugs that puzzle new script writers come from one habit of the shell, rewriting a command line before it runs, and quoting is how you take control of that.
In this topic
- From typed commands to a script
- The shebang line
- Comments, long lines and permissions
- What the shell does before a command runs
- Worked example: a pattern eaten by a glob
- Single quotes: everything literal
- Double quotes: variables in, globs out
- Backslashes and literal single quotes
- Worked example: quoting an awkward string
- Common mistakes to avoid
- Key takeaways
This topic is part of Wuanberri Pro. Checking your access…
