diff options
author | Chet Ramey <chet.ramey@case.edu> | 2016-05-23 09:57:30 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2016-05-23 09:57:30 -0400 |
commit | bddda3d2e1db0cd378bdf3866dd4eff8e6d78909 (patch) | |
tree | 768cb90309fca1fa17b68cf69b05595348cd7e84 /tests/getopts10.sub | |
parent | 0fcb33443880575eefb23e03dece81049c4509ea (diff) | |
download | bash-bddda3d2e1db0cd378bdf3866dd4eff8e6d78909.tar.gz |
commit bash-20160520 snapshot
Diffstat (limited to 'tests/getopts10.sub')
-rw-r--r-- | tests/getopts10.sub | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/getopts10.sub b/tests/getopts10.sub new file mode 100644 index 00000000..84bacf8f --- /dev/null +++ b/tests/getopts10.sub @@ -0,0 +1,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 |