I'm writing my first bash script and I'm trying to parse arguments. I have a
for arg in "$@"
loop set up, but I want some arguments to be read together, for instance if the user passes -a info it would find out what $number -a is and also read $number + 1. Is this something I can do?
I could make the loop keep $count ++ each iteration to tell what arg I'm on, and since my script is set to bomb out if it finds something invalid, I set an if statement to continue if a $skip var is above 0, I just need to figure out how to read $arg +1.
I haven't tried much. I'm still new (my first script) at this and I don't know too many commands. Google got me this far, but I hit a wall.