I have multiple Key:Value pair data blocks separated by delimiter "*************" in an text file.The help required here is for a shell script to convert them into csv file.
*************
Name : Anderson
Age : 32
Country : U.S
*************
Name : Pramod
Country : U.K
*************
Country : Africa
Sport : Football
*************
The Output should be the csv file with below format OutPut :
Name,Age,Country,Sport
Anderson,32,U.S.A,
Pramod,,U.K,
,,Aftica,Football
This is kind of similar to rec2csv conversion from GNU recutils , but this I want it to get done by Shell Scripting