Stats

158 Contributors: 5
2016-12-29
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook

Scripting with Parameters

Download bash eBook

Remarks

  • shift shifts the positional parameters to the left so that $2 becomes $1, $3 becomes $2 and so forth.
  • "$@" is an array of all the positional parameters passed to the script/function.
  • "$*" is an string composed of all the positional parameters passed to the script/function.

Related Examples