shell脚本变量的参数
2017-05-24 21:33
281 查看
https://stackoverflow.com/questions/5163144/what-are-the-special-dollar-sign-shell-variables
mkdir folder && cd $_ (创建一个目录,并且立马切换到这个目录里面去。)
mkdir folder && cd $_ (创建一个目录,并且立马切换到这个目录里面去。)
$1,
$2,
$3, ... are the positional parameters.
"$@"is an array-like construct of all positional parameters,
{$1, $2, $3 ...}.
"$*"is the IFS expansion of all positional parameters,
$1 $2 $3 ....
$#is the number of positional parameters.
$-current options set for the shell.
$$pid of the current shell (not subshell).
$_most recent parameter (or the abs path of the command to start the current shell immediately after startup).
$IFSis the (input) field separator.
$?is the most recent foreground pipeline exit status.
$!is the PID of the most recent background command.
$0is the name of the shell or shell script.
相关文章推荐
- shell 脚本参数变量
- Shell脚本中的位置变量参数(特殊字符)实例讲解
- Shell脚本中判断输入变量或者参数是否为空的方法
- shell脚本程序中的部分常用环境变量和参数变量的说明以及简单shell脚本示例
- shell脚本变量与参数
- Shell脚本中的位置变量参数(特殊字符)实例讲解
- Shell 变量、脚本参数
- Shell脚本中判断输入变量或者参数是否为空的方法
- linux中的for、while循环输出中赋值变量及shell中循环获取脚本参数
- shell脚本传递参数的七个特定的变量
- Shell脚本中判断输入变量或者参数是否为空的方法
- shell学习笔记--特殊变量参数
- shell和c语言的参数变量传递!(小寿原创)
- Shell中脚本变量和函数变量的作用域
- shell脚本中的特殊变量
- Linux系统shell脚本判断变量文件目录:权限、是否存在、空值、相等
- shell脚本读取变量方法
- 让shell脚本中的正则表达式调用变量
- shell脚本判断输入参数个数
- Shell编程之脚本参数传递笔记