tee ---- 文本文件制作工具
文章目录
优势
相对于 重定向 操作符 > 和 >>
- 功能更多
- 权限丰富
功能
把 命令行获取到的输入,输出到文件
可以接受的输入类型:
- stdin
- stdout
- Pipe 管道结果
类似 >
管道
1echo hello | tee /path/to/my_file.txtheredoc
1 2 3 4 5tee my_file.txt <<-EOF hello line one line second line three EOFstdin
1tee my_file.txt < /etc/passwd- 把 /etc/passwd 作为 stdin 传给 tee, tee 再导入 my_file.txt
类似 >>
eg:
| |
文章作者
上次更新 2022-03-07 (de34a70)