Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 去除文档中的重复行
- ```bash
- awk '{if (!seen[$0]) print $0; seen[$0]=$0}' test.txt
- ```
- ---
- # 查找当前目录下的空文件
- ```bash
- for i in `ls -1s | awk '{if ($1==0) print $2}'`; do echo $i; done;
- ```
- 以下这行功能与上面一致,只是变量表示方式不同:
- ```bash
- for i in $(ls -1s | awk '{if ($1==0) print $2}'); do echo $i; done;
- ```
Add Comment
Please, Sign In to add comment