#!/usr/bin/env bash if [[ "$1" == "" ]]; then echo "Usage: ${0##*/} "; exit 2 fi set -o errexit set -o nounset set -o pipefail cat > "${1}" << EOF #!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail echo "${1}" EOF chmod +x "${1}"