Shell Parsing Process
来源:互联网 发布:在淘宝网买东西可靠吗 编辑:程序博客网 时间:2024/06/05 08:16
1. Redirection Parse
>, >>, 2>, | , <
2. Command and variable substitution
$var, $(cmd), ${var}
3. Wildcard expansion (file name wildcard)
*, ?, []
4. Command Execution
example:
ls * ===>
1). * -expansion ----> all files 不包括 dot(.)开头的file name;
2). ls ..........filenames......
ls $HOME/*.? 2>/dev/null | tee filelist.txt
Other TIPS:
1. 2> &1
2. 所有shell的 通配符,不能匹配 dot(.)
3. fc -l ---> list all cmd history ; fc -e - n --> run the cmd from history
4. kill PID --> default send 15 signal ID(Termination signal) ; -9 Kill Signal
5. hostname ----> 一个命令
6. $(cmd) --> 运行命令, ${cmd} 解引用变量
7. alias --- 相反----> unalias
8. find 选项 --》
-o === or ;
-type f/d;
-size +n(>n) -n(<n) n(==0);
-mtime +x(>x days) (-x) < x
-perm 777 rxw
-newer file
9. grep 选项
-v do not match
-c count of matching lines
-l names of the files
-n the number of matching linse in the file
-i ignore the case
-w whole word matching
10. sort 选项
-t delimiter
+field[.column] --> field --> column
11. head & tail
head -n ---> 开始的几行
tail -n ---》 结束开始倒数几行
tail +n ----》 文件第n行开始的所有行
- Shell Parsing Process
- Shell和Process 应用
- new shell process
- Process in Shell
- Erlang的“ERROR: Shell process terminated!”错误
- spark 2.1 spark-shell Startup Process
- process
- process
- Process
- process
- process
- Process
- Process
- process
- Process
- process
- process
- shell 和 Process 控制执行多个进程的区别
- UITableView多选删除,类似mail中的多选删除效果
- 主流Java Web服务器(应用服务器)
- Pydev的安装和设置
- 面试体会
- 进程和线程的联系和区别
- Shell Parsing Process
- Python截取路径中的文件名
- 实用控件:将任意文件打包进dfm(zlib压缩)的控件
- 一对多关系通过外键关系连接两个表,而没有中间的表。
- ARM裸奔程序如何调用库函数
- 利用plsql developer的命令或isqlplus将查询结果保存到文件中
- html入门的一些东西
- 新建用户、付权限命令
- Objective-C初学者指南(第2版)