Advertisement
Tobiasz931

Skrypt z zajęć

Oct 23rd, 2012
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/bash
  2. hflag=
  3. vflag=
  4. pomoc() {
  5. echo "pomoc"
  6. }
  7. wersja() {
  8. echo "wersja"
  9. }
  10. while getopts hvf:q OPT; do
  11. case $OPT in
  12. h) hflag=1;;
  13. v) vflag=1;;
  14. f) echo PLIK=$OPTARG;;
  15. q) exit;;
  16. esac
  17. done
  18. if [ ! -z $hflag ]; then
  19. pomoc
  20. fi
  21. if [ ! -z $vflag ]; then
  22. wersja
  23. fi
  24.  
  25. echo $PLIK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement