[root@jboss shell]# cat shift.sh 

#!/bin/bash

until [ $# -eq 0 ];do

   echo "the first is:$1  total is $#"

shift

done

[root@jboss shell]# ./shift.sh  1 2 3 4 5 6 

the first is:1  total is 6

the first is:2  total is 5

the first is:3  total is 4

the first is:4  total is 3

the first is:5  total is 2

the first is:6  total is 1

[root@jboss shell]# cat shiftest.sh 

#!/bin/bash


until [ -z "$1" ]  

do

  echo "$@ "


  shift


done

[root@jboss shell]# ./shiftest.sh 1 2 3 4 5 6 7 8 9 

1 2 3 4 5 6 7 8 9 

2 3 4 5 6 7 8 9 

3 4 5 6 7 8 9 

4 5 6 7 8 9 

5 6 7 8 9 

6 7 8 9 

7 8 9 

8 9