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

shell 命令 #19

Open
zuobaiquan opened this issue Jan 6, 2022 · 0 comments
Open

shell 命令 #19

zuobaiquan opened this issue Jan 6, 2022 · 0 comments

Comments

@zuobaiquan
Copy link
Owner

shell脚本中$的多种用法($* 、 $@ 、$_ 、$# 、$$ 、$! 、 $? )

$0 脚本本身的名字
$1 脚本后所输入的第一串字符
$2 传递给该shell脚本的第二个参数
$_ 表示上一个命令的最后一个参数
$# 脚本后所输入的字符串个数
$$ 脚本运行的当前进程ID号
$* 脚本后所输入的所有字符"westos linux lyq"
$@ 脚本后所输入的所有字符’westos’ ‘linux’ ‘lyq’

运用
mkdir lerna-repo && cd $_
创建lerna-repo 文件夹 并进入当前文件夹

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