Advertisement
Guest User

Untitled

a guest
May 20th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. 26 while getopts ":a:b:p:u" opts;
  2. 27 do
  3. 28 case $opts in.
  4. 29 a) echo got an A flag;;
  5. 30 b) echo got an B flag;;
  6. 31 u) user=$OPTARGS echo $user;;
  7. 32 p) pass=$OPTARGS echo $pass;;
  8. 33 ?) echo I don't know what flag is this;;
  9. 34 esac
  10. 35 done
  11. 36
  12. 37 echo user: $user pass: $pass
  13.  
  14. bash-4.3$ ./functionexample.sh -p 123 -u mona
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement