summaryrefslogtreecommitdiffstats
path: root/tests/getopts10.sub
blob: 84bacf8f53a49827d14020c87e58e4e3f73d0bb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
set -- -a bb
readonly OPTARG
getopts :x x

echo OPTARG = $OPTARG x = $x

getopts x x
echo ${OPTARG-unset} x = $x

typeset -r RO=foo
typeset -n OPTARG=RO

getopts :x x
typeset -p RO

getopts x x
typeset -p RO