arrays in awk
Hi,
I have the following data in a file for example:
Name="Fred","Bob","Peterson","Susan","Weseley"
Age="24","30","28","23","45"
Study="English","Engineering","Physics","Maths","Psychology"
Code="0","0","1","1","0"
Name="Fred2","Bob2","Peterson2","Susan2","Weseley2"
Age="23","29","25","21","44"
Study="English2","Engineering2","Physics2","Maths2","Psychology2"
Code="1","1","1","1","1"
Can you help me with an awk script to print the file such as:
Name,Age,Study,Code
Fred,24,English,0
Bob,30,Engineering,0
Peterson,28,Physics,1
Susan,23,Maths,1
Weseley,45,Psychology,0
Fred2,23,English2,1
Bob2,29,Engineering2,1
.
.
.
Thanks
Last edited by james2009; 04-17-2009 at 09:34 AM..