When I used this command on Red Hat Linux
/usr/sbin/ss -i
I get the following output below:
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 0 0 <IP_ADD:PORT> <IP_ADD:PORT>
ts sack wscale:2,2 rto:204 rtt:4.5/6.5 ato:40 cwnd:3
ESTAB 0 0 <IP_ADD:PORT> <IP_ADD:PORT>
ts sack wscale:2,2 rto:213 rtt:13.875/18.5 ato:40
ESTAB 0 0 <IP_ADD:PORT> <IP_ADD:PORT>
ts sack wscale:2,2 rto:201 rtt:1.875/0.75 ato:40
ESTAB 0 0 <IP_ADD:PORT> <IP_ADD:PORT>
ts sack wscale:9,2 rto:201 rtt:1.875/0.75 ato:40
Whenever I try to pipe grep to that command ex:
/usr/sbin/ss -i | grep <SOME_IP_ADD>
I have this output
ESTAB 0 0 <IP_ADD:PORT> <IP_ADD:PORT>
ESTAB 0 0 <IP_ADD:PORT> <IP_ADD:PORT>
ESTAB 0 0 <IP_ADD:PORT> <IP_ADD:PORT>
Notice that grep didn't include this:
ts sack wscale:2,2 rto:204 rtt:4.5/6.5 ato:40 cwnd:3
because its on another line. So how do I adjust the column width whenever I use this command or other linux commands for that matter. So that the output will not word-wrap or goto the next line? Better yet are their better ways of doing this? Thanks alot!