Skip to content

Instantly share code, notes, and snippets.

@bsnape
bsnape / bash_args.sh
Created December 12, 2017 10:18
bash arguments
#!/usr/bin/env bash
set -x
set -e
if [ $# -eq 0 ]; then
echo "Received no arguments. Exiting..."
exit
fi
# $@ is one-based and not zero-based