Skip to content

Instantly share code, notes, and snippets.

@rohityadavcloud
Created January 9, 2015 10:48
Show Gist options
  • Save rohityadavcloud/a031d0eebacf9b033d90 to your computer and use it in GitHub Desktop.
Save rohityadavcloud/a031d0eebacf9b033d90 to your computer and use it in GitHub Desktop.
domains=1
instances=1
usage(){
echo "usage: $0 [-d domains] [-i instances]"
echo " -d number of domains to create (defaults to 1)"
echo " -i number of instances to create (defaults to 1)"
echo " -h (prints this help)"
}
while getopts d:i:h opt
do
case "$opt" in
d) domains="$OPTARG";;
i) instances="$OPTARG";;
h) usage
exit 0;;
/?) # unknown flag
usage
exit 1;;
esac
done
echo Creating $domains Domains
echo Creating $instances Instances
// Use captured variables to do stuff here...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment