shell知识点
来源:互联网 发布:服装收银软件 编辑:程序博客网 时间:2024/06/06 06:52
1.标准输出输入及标准错误输出
0表示标准输入,1表示标准输出,2表示标准错误输出
>默认为标准输出重定向,与 1> 相同
2>&1 把标准错误输出重定向到标准输出
&>file 把标准输出和标准错误输出都重定向到文件file中
2. shell变量$#,$@,$0,$1,$2的含义解释
$$ : Shell本身的PID(ProcessID)
$! : Shell最后运行的后台Process的PID
$? : 最后运行的命令的结束代码(返回值)
$- : 使用Set命令设定的Flag一览
$* : 所有参数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出所有参数。
$@ : 所有参数列表。如"$@"用「"」括起来的情况、以"$1" "$2" … "$n" 的形式输出所有参数。
$# : 添加到Shell的参数个数
$0 : Shell本身的文件名
$1~$n : 添加到Shell的各参数值。$1是第1参数、$2是第2参数…。
3.
阅读全文
0 0
- shell知识点
- shell知识点
- shell知识点
- shell小知识点
- Shell脚本知识点
- shell知识点(一)
- shell脚本知识点总结
- shell知识点总结
- linux shell 知识点
- shell中几个知识点
- shell知识点2
- shell 知识点备忘
- shell必懂知识点
- shell知识点01
- shell 脚本知识点
- linux-shell脚本知识点
- shell编程知识点集锦
- shell知识点整理
- 北宋名臣王安石后世传人在松滋
- WPF TreeView大数据量多层级搜索定位
- 迷宫问题 dfs bfs
- 字符数组、字符串、整型数之间的转化
- memset()、memcpy()、memcmp()的使用方法
- shell知识点
- solr中Cache综述
- springMvc 配置 controller 配置 spring-dispatcher-servlet.xml
- 关于 redis3.2.9 在 centos7 的 配置 及 Jedis 与 虚拟机 centos7 redis 连接的问题
- HashMap使用对象作为key
- Android三种播放视频的方式
- Hive 2.1.1安装配置
- 10.C++对C的扩展
- POJ 1389 Area of Simple Polygons 笔记