This question already has an answer here:
I have the following text:
serverName: NZRC222 total: 8.46 GB serverId: 259695 serverName: NZRC333 total: 50.13 TB serverId: 260582 serverName: NZRC555 total: 9.31 TB serverId: 260956
My desired output would be:
serverName: NZRC222, total: 8.46 GB, serverId: 259695, serverName: NZRC333, total: 50.13 TB, serverId: 260582, serverName: NZRC555, total: 9.31 TB, serverId: 260956,
Basically, I want to generate a
csv file which can be imported to the Excel.
When I go with :
sed '/\w.*/ a ,' file I get this:
serverName: NZRC222 , total: 50.13 TB , serverId: 260582 , serverName: NZRC333 , total: 9.31 TB , serverId: 260956 ,
Any suggestions? Thank you in advance!