码迷,mamicode.com
首页 > 其他好文 > 详细

20181207tee管道

时间:2018-12-07 21:57:21      阅读:291      评论:0      收藏:0      [点我收藏+]

标签:images   proc   ges   com   tee   roo   water   src   image   

tee 管道

技术分享图片
[root@tianyun ~]# ip addr |grep ‘inet ‘ |tee ip.txt |awk -F"/" ‘{print $1}‘ |awk ‘{print $2}‘
127.0.0.1
128.172.16.60.1
root@tianyun ~]# 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


[root@tianyun ~]# ip addr |grep ‘inet ‘ |tee -a ip.txt |awk -F"/" ‘{print $1}‘ |awk ‘{print $2}‘ -a是追加的意思
127.0.0.1
172.16.60.1


[root@tianyun ~]# date >date.txt
[root@tianyun ~]# date |tee date.txt

root@tianyun ~]# top -d 1 -b -n 1 > top.txt
[root@tianyun ~]# top -d 1 -b -n 1 |tee top.txt

20181207tee管道

标签:images   proc   ges   com   tee   roo   water   src   image   

原文地址:http://blog.51cto.com/8450442/2327753

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!