$4: 4th Positional Parameter

$4 is the value of the fourth positional parameter.

Examples

Print 4th parameter value
1
echo $4
Print with a fallback value
1
echo ${4-Fallback value}
BashSupport Pro is a Bash IDE with support for $4try it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal