tee read stdin and write stdout | telnet localhost 999 2>&1 | tee -a log

[root@localhost tmp]# telnet localhost 999 2>&1 | tee -a log
telnet: connect to address ::1: Connection refused
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
Trying 127.0.0.1...
[root@localhost tmp]# cat log

telnet: connect to address ::1: Connection refused
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
Trying 127.0.0.1...

Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all