Hi All,
i am trying to replace 0.0.0.0
in below file. but i am not able to replace it.
File :
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1351/master
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 1272/nrpe
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1250/sshd
tcp 0 48 172.31.26.221:22 205.169.21.6:26755 ESTABLISHED 1758/sshd
tcp 0 1 172.31.26.221:50472 10.100.0.242:10514 SYN_SENT 1096/rsyslogd
used below command to replace but it's replacing 0 of Send-Q column as well.
sed 's/0.0.0.0/ALL/g' file
ouput :
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 ALL:* LISTEN 1351/master
tcp 0 ALL.0:5666 ALL:* LISTEN 1272/nrpe
tcp 0 ALL.0:22 ALL:* LISTEN 1250/sshd
tcp 0 0 172.31.26.221:22 205.169.21.6:59630 ESTABLISHED 2070/sshd
tcp 0 1 172.31.26.221:50502 10.100.0.242:10514 SYN_SENT 1096/rsyslogd
Desired output :
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 ALL:* LISTEN 1351/master
tcp 0 0 ALL:5666 ALL:* LISTEN 1272/nrpe
tcp 0 0 ALL:22 ALL:* LISTEN 1250/sshd
tcp 0 0 172.31.26.221:22 205.169.21.6:59630 ESTABLISHED 2070/sshd
tcp 0 1 172.31.26.221:50502 10.100.0.242:10514 SYN_SENT 1096/rsyslogd
Can someone please help on this issue.