I have the following data table:
ssh 22/tcp 0.182286 # Secure Shell Login linuxconf 98/tcp 0.000088 tacnews 98/udp 0.000560 # TAC News
from which I wish to generate a CSV file in the following format:
ssh,22,tcp,Secure Shell Login linuxconf,98,tcp, tacnews,98,udp,Tac News
I am discarding the fractional decimal number and including the description without the '# ' if it exists.
I see the data as a bunch of fields (forgive the faux regex):
For which I would output:
What would be the most simplest and most appropriate tool to do this? I'd be grateful for help with the syntax to achieve this.