Created
January 9, 2015 10:48
-
-
Save rohityadavcloud/a031d0eebacf9b033d90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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