Shell shift procedure - What is this?
问题 In shell we have the command shift, but i saw on some example its giving shift 3 Why there is a number after shift ? and what its about ? what it does ? Example: echo “arg1= $1 arg2=$2 arg3=$3” shift echo “arg1= $1 arg2=$2 arg3=$3” shift echo “arg1= $1 arg2=$2 arg3=$3” shift echo “arg1= $1 arg2=$2 arg3=$3” shift The output will be: arg1= 1 arg2=2 arg3=3 arg1= 2 arg2=3 arg3= arg1= 3 arg2= arg3= arg1= arg2= arg3= But when i add that, it doesn't display it correctly. 回答1: Take a look at the man