Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- hflag=
- vflag=
- pomoc() {
- echo "pomoc"
- }
- wersja() {
- echo "wersja"
- }
- while getopts hvf:q OPT; do
- case $OPT in
- h) hflag=1;;
- v) vflag=1;;
- f) echo PLIK=$OPTARG;;
- q) exit;;
- esac
- done
- if [ ! -z $hflag ]; then
- pomoc
- fi
- if [ ! -z $vflag ]; then
- wersja
- fi
- echo $PLIK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement