Currently, I have some flag -x, along with some others:
while getopts abcx opt; do
case $opt in
a) a=true; ;;
b) b=true; ;;
c) c=true; ;;
x) x=true; ;;
esac
done
However, I want to make it so that adding an x will increase the level of the flag. I've seen this with v for verbose with extra v's increasing the verbosity. How do I detect this in my Bash script?