Your First Script

1 / 11

You already know how to run commands one at a time. A script is nothing more than a file containing the commands you would have typed, run by the same shell that would have run them interactively.

That is the whole idea, and it is worth taking seriously — because it means there is no separate "scripting language" to learn. Everything you already type at the prompt is valid in a script, and almost everything in a script is valid at the prompt. What follows is mostly a tour of the parts you wouldn't type by hand.

Finish →