I need to replace "::" (first two colons with a * ).I can get these values in a variable.How to tweak this variable to separate out the way i want? Anything after third ":" should be set to new variable.Anything before third ":" should be checked for "::" and if yes,replaced (or echoed by *).
abhi@myhost:/home/abhi> /bin/netstat -anee --tcp -udp |egrep -v "Active|Proto"
(No info could be read for "-p": geteuid()=24616 but you should be root.)
tcp 0 0 127.0.0.1:20032 0.0.0.0:* LISTEN 0 7910 -
tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN 0 38112261 -
tcp 0 0 10.132.135.239:427 0.0.0.0:* LISTEN 0 7441 -
tcp 0 0 53.231.201.253:427 0.0.0.0:* LISTEN 0 7437 -
tcp 0 0 127.0.0.1:427 0.0.0.0:* LISTEN 0 7436 -
.
.
.
I am unable to get rid of line starting with "(No.....".
How do i remove this line from comamnd's output?