I have a csv file like this(date values just 7 days, but not static):
DATE,PATH,%
20.05.2015,RAM,0
20.05.2015,SWAP,00
20.05.2015, /, 000
20.05.2015, /dev, 0000
21.05.2015,RAM,1
21.05.2015,SWAP,11
21.05.2015, /, 111
21.05.2015, /dev, 1111
22.05.2015,RAM,2
22.05.2015,SWAP,22
22.05.2015, /, 222
22.05.2015, /dev, 2222
22.05.2015, /root, 22222
22.05.2015, /root2, 222222
23.05.2015, /root2, 333333
24.05.2015, /root2, 444444
25.05.2015, /root2, 555555
26.05.2015, /root2, 666666
I need to print date values of rows to columns like this:
PATH,20.05.2015,21.05.2015,22.05.2015,23.05.2015,24.05.2015,25.05.2015,26.05.2015
RAM,0,1,2,,,,
SWAP,00,11,22,,,,
/,000,111,222,,,,
/dev,0000,1111,2222,,,,
/root,,,22222,,,,
/root2,,,222222,333333,444444,555555,666666
Any suggestion for that with awk or other way?
I tried solutions on this topic:
An efficient way to transpose a file in Bash
But it's a different question, I can't fix for my question.
Excel view for easy understanding: