Skip to content

Glossary: Command Line for IT: Bash and PowerShell

$1

Also written: $2, $0, $#, positional parameters, arguments

Inside a bash script, $1 is the first argument (the first word after the script name), $2 is the second, $# is how many arguments there are, and $0 is the script's own name. check-disk.sh reads its GB limit from $1.

Where the book teaches it

Related terms

$@