shell script

A text file of shell commands that runs them in order, top to bottom, as if you had typed them one by one.

In more detail

Scripts are quick to write, but they describe steps rather than a result, so running one twice performs every step twice. It must be executable, or be passed to a shell such as bash, to run.

Examples

bash setup.sh
Running setup.sh twice appended the same configuration line twice, which a playbook describing the line as present does not do.
bash tests/run.sh
.git/hooks/commit-msg is a short shell script Git runs before recording a commit.

Related terms

Taught in

References

Certification courses