Writing Portable Scripts with Strict Options

Updated

October 31, 2026

Writing Portable Scripts with Strict Options

In /bin/sh, -o pipefail is not defined in standard POSIX. Use portable strict options:

#!/bin/sh
set -eu