Command Line Help

I am trying to pull information from the command line. Everything is okay except I don't know how to change it from $1 to $2 etc while I am in a while loop. If I hard code $1 in it works fine, but how can I tell it to do $1, then $2 etc. Any help would be appreciated.

this might work for you. using shift you can always refer to the next argument as $1. just make sure you don't need them anymore.

while [ $# -ne 0 ]
do
   echo "parm is $1"
   shift 
done