TIL - Bash Shift

In bash, use shift to reassign positional arguments.

For example:

$1 $2 $3

Would become

$1 matches old $2
$2 matches old $3

You'll only receive email when After Gibson publishes a new post

More fromĀ After Gibson