Introduction
Shifting arguments helps you move through command-line inputs one by one. It makes handling many inputs easier.
When you want to process each command-line argument in order.
When you need to remove the first argument after using it.
When writing scripts that accept a flexible number of inputs.
When looping through all arguments without knowing how many there are.