Grizzly521
Technical User
Hi. Im wondering if there is a way to use flags when starting a script.
Something like this.
Script -a -b 10
Right now Ive got something like this.
while getopts ab AA
do case $AA in
a) var="value"
;;
esac
done
So with that code I can only use flags ( -a -b ). Can I do the -b 10 so it will store say varB=10?
Something like this.
Script -a -b 10
Right now Ive got something like this.
while getopts ab AA
do case $AA in
a) var="value"
;;
esac
done
So with that code I can only use flags ( -a -b ). Can I do the -b 10 so it will store say varB=10?