concept
Bash function arguments
Function positional parameters describe the current invocation; caller positional parameters are restored afterward.
Formal Syntax & Structure
bash syntaxbash
name arg ...; "$@"Return Value
words
Function positional parameters describe the current invocation; caller positional parameters are restored afterward.
Working Example
Example Snippetbash
set -- outershow() { printf 'count=%s\n' "$#" printf '[%s]\n' "$@"}show 'two words' ''printf 'caller=%s\n' "$1"