If variable is given, shift the words in a wordlist variable; i.e., name  becomes name . With no argument, shift the positional parameters (command-line arguments; i.e., $2 becomes $1. shift is typically used in a while loop. See additional example under while.
while ($#argv)While there are arguments
if (-f $argv)
wc -l $argv
echo "$argv is not a regular file"
shiftGet the next argument