Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shift处理shell脚本参数 #8

Open
KirinHuang opened this issue Apr 26, 2019 · 0 comments
Open

shift处理shell脚本参数 #8

KirinHuang opened this issue Apr 26, 2019 · 0 comments

Comments

@KirinHuang
Copy link
Owner

参数相关的变量

参数 描述
$0 命令本身,类似c的argv[0]
$1、$2…… 第1个参数、第2个参数……
$# 参数的个数,不包括$0
$@ 以列表的形式返回参数列表,不包括$0
$? 最后运行的命令结束代码

参考

shell学习 - 处理脚本的多参数输入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant