-errexit: exit the script when a command fails
-nounset: fail when referencing an unset variable
-pipefail: fail when the any command in a pipeline fails, not just the last one
The last option is unfortunately harder to use, since some programs misbehave in pipelines.
The "shebang" treats everything after the binary as a single argument. It only does one argument from the shebang and the file itself as the final argument. So it would run that kinda like