test.sh 466 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
while getopts ":d-" opt; do
    case ${opt} in
        d)
          echo '1'
    ;;
        -)
            case ${OPTARG} in
                "tm"*)
                      echo '2'
            ;;
            esac 
    ;;
    esac
done
15

16
17
18
19
20
21
22
23
24
25
while getopts ":a-:" opt; do
    case ${opt} in
        a) echo "Do something"
            ;;
        -)
            case ${OPTARG} in
                "word"*) echo "This works"
                    ;;
            esac
    esac
26
done