Files
developer-roadmap/roadmaps/shell-bash/content/set--o@OOskpOLWFe1rN0XMuabAS.md
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

9 lines
900 B
Markdown

# set -o
The `set -o` command in shell scripting is used to modify shell options, which control the behavior of the shell. These options can affect how the shell interprets commands, handles errors, and performs other tasks. By using `set -o` with specific option names, you can customize the shell's environment to suit your needs, enabling features like error handling, debugging, and more strict command execution.
Visit the following resources to learn more:
- [@article@Prevent Unset Variables in Your Shell / Bash Scripts with set nounset](https://nickjanetakis.com/blog/prevent-unset-variables-in-your-shell-bash-scripts-with-set-nounset)
- [@article@set -e, -u, -o, -x pipefail explanation](https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425)
- [@video@Prevent Unset Variables in Your Shell / Bash Scripts with set -o nounset](https://www.youtube.com/watch?v=Kly_6DhfHwE)