BASH: Script Input Flags

Hi. Im wondering if there is a way to use flags when starting a script.
Something like this.

[CODE]Script -a -b 10[/CODE]

Right now Ive got something like this.

while getopts ab AA
do case $AA in
a) var="value"

So with that code I can only use flags ( -a -b ). Can I do the -b 10 so it will store say varB=10?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!