Hello gotamp,
Could you please try following and let me know if this helps you.
Let's say following is the Input_file.
cat Input_file
200,1245,E1,1,E1,,7611068,KWH,30, ,,,,,,,,
200,1245,E1,1,E1,,7611070,KWH,30, ,,,,,,,,
300,20140223,0.001,0.001,0.001,0.001,0.001
300,20140224,0.001,0.001,0.001,0.001,0.001
300,20140225,0.001,0.001,0.001,0.001,0.001
300,20140226,0.001,0.001,0.001,0.001,0.001
300,20140227,0.001,0.001,0.001,0.001,0.001
300,20140228,0.001,0.001,0.001,0.001,0.001
300,20140301,0.001,0.001,0.001,0.001,0.001
300,20140302,0.001,0.001,0.001,0.001,0.001
300,20140303,0.001,0.001,0.001,0.001,0.001
300,20140304,0.001,0.001,0.001,0.001,0.001
1300,20140305,0.001,0.001,0.001,0.001,0.001
300,20140305,0.001,0.001,0.001,0.001,0.001
300,20140305,0.001,0.001,0.001,0.001,0.001
200,1254,E1,1,E1,,4749337,KWH,30, ,,,,,,,,
300,20140306,0.001,0.001,0.001,0.001,0.001
Then following code may be helpful for you, which will insert a line after 13th line of Input_file and save the Input_file too with changes.
sed -n -i 'p;13a "CHUMMA"' Input_file
Output will be as follows now.
cat Input_file
200,1245,E1,1,E1,,7611068,KWH,30, ,,,,,,,,
200,1245,E1,1,E1,,7611070,KWH,30, ,,,,,,,,
300,20140223,0.001,0.001,0.001,0.001,0.001
300,20140224,0.001,0.001,0.001,0.001,0.001
300,20140225,0.001,0.001,0.001,0.001,0.001
300,20140226,0.001,0.001,0.001,0.001,0.001
300,20140227,0.001,0.001,0.001,0.001,0.001
300,20140228,0.001,0.001,0.001,0.001,0.001
300,20140301,0.001,0.001,0.001,0.001,0.001
300,20140302,0.001,0.001,0.001,0.001,0.001
300,20140303,0.001,0.001,0.001,0.001,0.001
300,20140304,0.001,0.001,0.001,0.001,0.001
1300,20140305,0.001,0.001,0.001,0.001,0.001
"CHUMMA"
300,20140305,0.001,0.001,0.001,0.001,0.001
300,20140305,0.001,0.001,0.001,0.001,0.001
200,1254,E1,1,E1,,4749337,KWH,30, ,,,,,,,,
300,20140306,0.001,0.001,0.001,0.001,0.001
In case you don't want to save the changes in Input_file then following may be helpful to you.
sed -n 'p;13a "CHUMMA"' Input_file
Hope this helps you(Also I tried this in GNU sed
only).
Thanks,
R. Singh