# cat test.sh
#!/bin/sh
while [ $# -gt 0 ]
do
x=$1
y=$2
shift 2
echo $x"="$y
done
# test.sh a 10 b 20 c 30
a=10
b=20
c=30
HTH - let me know if this makes sense - there are a number of ways of handling this sort of thing, and it can depend a little on exactly what you are wanting to do overall...but if you're trying to learn I think this should be a good start point...you can get "cleverer" when you understand the basics, but always learn to walk before running