HI,
Iam new to scripting..I need some guidance for invoking the following logic..
My input file contains
Event Time = Thu, Nov 6, 2008 08:41:56 AM
Probable Cause = UnspecifiedReason
Specific Problems = BTS down due to Tx
Domain = Domain 00-00-00-00-00-00-00-A8-1D-4E-91-5D-4C-75:.gp.dm.GSM_dm
Alarm Origin = IncomingAlarm
Perceived Severity = Critical
Additional Text = "NeType: BSC6000| NeLocation: | vendor: | neName: SVHBS150| alarmName: FUEL LEVEL
LOW| alarmLocation: Site No.=1188,Board Type=70,Board No.=0,PassNo=255,SubLink
No.=255,CellNo=65535,Site Type=16,RackNo=255,BoxNo=255,SlotNo=255| appendInfo:
MOI=DC=www.huawei.com , SubNetwork=1 , ManagedElement=7 , BssFunction=0 ,
BtsSiteMgr=1188
NotificationId=4900
SpecificProblem=6448
<ALM_ID>580757<ALM_ID>"
Original Severity = Critical
Original Event Time = Thu, Nov 6, 2008 08:41:56 AM
Problem Occurrences = 1 Problems
Now from the above i need following output:
Event Time = Thu, Nov 6, 2008 08:41:56 AM
output of this should be
eventTime=06-11-2008-08-41..
Additional Text = "NeType: BSC6000| NeLocation: | vendor: | neName: SVHBS150| alarmName: FUEL LEVEL
LOW| alarmLocation: Site No.=1188,Board Type=70,Board No.=0,PassNo=255,SubLink
No.=255,CellNo=65535,Site Type=16,RackNo=255,BoxNo=255,SlotNo=255| appendInfo:
MOI=DC=www.huawei.com , SubNetwork=1 , ManagedElement=7 , BssFunction=0 ,
BtsSiteMgr=1188
NotificationId=4900
SpecificProblem=6448
<ALM_ID>580757<ALM_ID>"
IN th einput additional text is containing n number of lines
if iam grepping to display the output only it is giving this value...
"NeType: BSC6000| NeLocation: | vendor: | neName:
,so I need to take the entire value of Additional text and whenever it has newline ~nl~ has to be appended i.e o/p should be
NeType: BSC6000| NeLocation: | vendor: | neName: SVHBS150|~nl~alarmName: FUEL LEVEL~nl~ LOW| alarmLocation: Site ~nl~No.=1188,Board Type=70,Board No.=0,PassNo=255,SubLink
~nl~ No.=255,CellNo=65535,Site ~nl~Type=16,RackNo=255,BoxNo=255,SlotNo=255| appendInfo:
~nl~ MOI=DC=www.huawei.com , ~nl~SubNetwork=1 , ManagedElement=7 , BssFunction=0 ,
~nl~ BtsSiteMgr=1188
~nl~ NotificationId=4900
~nl~SpecificProblem=6448
~nl~<ALM_ID>580757<ALM_ID>
....
Can anyone help me out for the above scripting....Thanks
Edit: Please use code tags to make it readable. I added tags to make it as readable as possible
LLB..