Home / cs-notes / Language / Shell / Arguments
variable | meaning |
---|---|
$0 | the script file name |
$n | the n th arg |
$# | length of args |
$* | ”$*”: all args as one arg |
$@ | ”$@”: all args as mutiple args |
$? | exit status code of previous command |
$$ | current process id |