Shift may refer to any of the following:
1. Shift is the name of a computer keyboard key. See our Shift key page for full information about this key.
3. When referring to a Linux shell, shift is a builtin command of the Bash shell. It shifts the values of command-line arguments for processing in a script. See our bash shift command page for further information.
4. In some programming languages shift is a function that removes the first element of an array. For example, in the Perl code below shift removes "one" from the beginning of the array to make it "two three".
my @example = ('one', 'two', 'three'); shift @example; print "@example"; #Prints: two three
If you want to add to the end of an array, use the push function. If you want to remove the first element of the array, use the shift function.