3 bash best practices Exit immediately if a command exits with a non-zero status: set -e Display the next command to be executed: set -x Use the right shebang, this is more portable than #!/bin/bash: #!/usr/bin/env bash