summaryrefslogtreecommitdiffstats
path: root/tests/getopts8.sub
blob: 6aeeca6f50546575ca848384374df12d1cddc257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
f()
{
	typeset OPTIND=1
	typeset opt

	while getopts ":abcxyz" opt
	do
		echo opt: "$opt"
		if [[ $opt = y ]]; then f -abc ; fi
	done
}

f -xyz