100 Useful Command-Line Utilities
by Oliver; 201479. shift
As in Perl and many other languages, shift pops elements off the array of input arguments in a script. Suppose tmpscript is:#!/bin/bash echo $1 shift echo $1Then:
$ ./tmpscript x y x yRefer to An Introduction to the Command-Line (on Unix-like systems) - Arguments to a Script to see how to use shift to make an input flag parsing section for your script.