set builtin

The builtin that turns shell options on with a minus sign and off with a plus sign, such as set -e and set +x.

In more detail

Options can be combined, as in set -euo pipefail. Run with no arguments it prints every variable, and set -- replaces the positional parameters.

Example

#!/bin/sh
set -eu
go test ./...

Related terms

Taught in

References