while getopts a:bc optdo case $opt in a) echo "aaa" echo $OPTARG b) echo "bb" c) echo "ccc" *) echo "error" esacdone