Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • See also [[ -o errexit ]] (ksh/bash/zsh) and [ -o errexit ] (bash/ksh/yash) Commented Nov 7, 2018 at 13:59
  • The shopt is a valid command for bash, there is no meaningful reason to avoid it (I is only a matter of your personal preference of how answers should be written). Not a meaningful change. @StéphaneChazelas Commented Nov 9, 2018 at 6:15
  • Solution is not working in /bin/sh. Commented Dec 25, 2023 at 9:21