I looked through some of the sed commands but couldn't figure it out. The tricky part, at least for me, is to keep the *:bootpc, *:ssh, etc. and to leave only the port numbers from the rest of the stuff. Can anyone tell me how to accomplish this?
Ygor and mahendramahendr your suggestions work fine. I'm trying to implement your one Ygor but I'm printing two colums at the same time and it strips off the first one entirely. This is the ouput and it should be with the Process name before it:
Process name dhcpcd on port *:bootpc Number of files opened 12
Process name sshd on port *:ssh Number of files opened 23
42904 Number of files opened 56
47380 Number of files opened 21