AU Main Date: 08-SEP-08 10:27:11
Profit and Loss Long Report Page: 1
Current Period: AUG-08
Personal Unit=AU003 (Industrial Products Division),Plant=B00089,Departmant=D110
Ptd-Actual Ptd-Budget Ptd-Variance YTD-Actual YTD-Budget YTD-Variance
Account Le BU Pl De In Fu
------------------------------ -- -- -- -- -- -- ------------ ------------ ------------ -------------- ------------- ------------
Operating Distribution 0.00 0.00 0.00 -30,808,210.75 0.00 30808210.75
Cost of Sales/OPNS 180,689.57 0.00 -180,689.57 173818430.54 0.00 -173818430.54
GROSS PROFIT 180,689.57 0.00 -180,689.57 -118521808.49 0.00 118521808.49
Marketing Distrib 0.00 0.00 0.00 0.00 0.00 0.00
Personal Unit=AU004 (Industrial Products Division),Plant=B01189,Departmant=D111
Ptd-Actual Ptd-Budget Ptd-Variance YTD-Actual YTD-Budget YTD-Variance
Account Le BU Pl De In Fu
------------------------------ -- -- -- -- -- -- ------------ ------------ ------------ -------------- ------------- ------------
Operating Distribution 0.00 0.00 0.00 -30,808,210.75 0.00 30808210.75
Cost of Sales/OPNS 180,689.57 0.00 -180,689.57 173818430.54 0.00 -173818430.54
GROSS PROFIT 180,689.57 0.00 -180,689.57 -118521808.49 0.00 118521808.49
Marketing Distrib 0.00 0.00 0.00 0.00 0.00 0.00
I need oput where ever i find Personal unit just capture that line and copy that line to make it like
Personal Unit=AU003
Plant=B00089
Departmant=D110
-->RAM:AU003:B00089
110:08-SEP-08:US Primary
I am using
sed -e '/Personal Unit/{;h;s/^/#/p;x;}' -e '/Business Unit/{s/,Plant/\nPlant/g' -e 's/,Departmant/\nDepartmant/g'} filename
But this is not fulfilling my requirement
Any one please help me on this