Passed Arguments

Command line arguments (a.k.a. passed parameters) are each numbered and can be accessed by the dollar sign ($) and the corresponding digit.

Shift Parameters

You can shift parameters to the left with the "shift" command. By default, it shifts everything one position.  The first arg is lost, the second becomes $1, the third becomes $2, and so on. You can put a number after the shift command, to shift items more than one position.

When shifting parameters, if you need to save a value, assign it to a variable:

When several different parameters are passed, to improve readability, assign them to named variables: