Created
December 19, 2019 23:43
-
-
Save ghelobytes/f031dd7e21cf789f210edc98b65f6697 to your computer and use it in GitHub Desktop.
Passing flagged parameters to bash script
This file contains 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
#!/usr/bin/env bash | |
while getopts u:d:p:b: option | |
do | |
case "${option}" | |
in | |
u) _USER=${OPTARG};; | |
p) _PASSWORD=${OPTARG};; | |
b) _BUILD=${OPTARG};; | |
esac | |
done | |
echo "USER: $_USER PASSWORD: $_PASSWORD BUILD: $_BUILD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment