Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 26 while getopts ":a:b:p:u" opts;
- 27 do
- 28 case $opts in.
- 29 a) echo got an A flag;;
- 30 b) echo got an B flag;;
- 31 u) user=$OPTARGS echo $user;;
- 32 p) pass=$OPTARGS echo $pass;;
- 33 ?) echo I don't know what flag is this;;
- 34 esac
- 35 done
- 36
- 37 echo user: $user pass: $pass
- bash-4.3$ ./functionexample.sh -p 123 -u mona
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement