I have some output from a pdsh I want to format it to load into a DB. I need it in 3 columns and essentially want the Module ID and the message on one line. Bellow is the output i have:
10.125.45.58,scope, Module ID = server-1
10.125.45.58,scope, Message = Correctable memory error
10.125.45.58,scope, Module ID = server-2
10.125.45.58,scope, Message = Correctable memory error
This is the output i need:
10.125.45.58,scope,server-1 Correctable memory error
10.125.45.58,scope,server-2 Correctable memory error
I have been awking and seding...i cant work it out any ideas?
Here is what I've done so far
cat myfile.txt | sed -e "s/:/\,scope\,/g" | grep -E '(Module ID|Message)'
Thank you.
awkandsedyou've done so far?