20181207tee管道
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了20181207tee管道相关的知识,希望对你有一定的参考价值。
tee 管道
[[email protected] ~]# ip addr |grep ‘inet ‘ |tee ip.txt |awk -F"/" ‘{print $1}‘ |awk ‘{print $2}‘
127.0.0.1
128.172.16.60.1
[email protected] ~]# cat ip.txt
inet 127.0.0.1/8 scope host lo
net 172.16.60.1/24 brd 172.16.60.255 scope global eth0
[[email protected] ~]# ip addr |grep ‘inet ‘ |tee -a ip.txt |awk -F"/" ‘{print $1}‘ |awk ‘{print $2}‘ -a是追加的意思
127.0.0.1
172.16.60.1
[[email protected] ~]# date >date.txt
[[email protected] ~]# date |tee date.txt
[email protected] ~]# top -d 1 -b -n 1 > top.txt
[[email protected] ~]# top -d 1 -b -n 1 |tee top.txt
以上是关于20181207tee管道的主要内容,如果未能解决你的问题,请参考以下文章
Linux CentOS 7 shell中的特殊字符及与管道相关的命令(cut,sort,wc,uniq,tee,tr,split)