Skip to content

Instantly share code, notes, and snippets.

@fushang318
Created March 23, 2012 03:17
Show Gist options
  • Save fushang318/2166442 to your computer and use it in GitHub Desktop.
Save fushang318/2166442 to your computer and use it in GitHub Desktop.
$0 shell的命令本身(包括完整路径)
$1到$9 数字表示shell 的第几个参数
$# 传递到脚本的参数个数
$* 以一个单字符串显示所有向脚本传递的参数
$$ 脚本运行的ID号
$! 后台运行的最后一个进程的ID号
$@ 与$*相同。
$- 显示shell使用的当前选项。
$? 显示最后命令的执行状况。0表示没有错误。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment