|
finding lines only between a certain string
Dear experts,
Ive been trying to figure this out for a while, but i cant. Please help.
I have a file, with approx 1 million lines. The contents are separated with "----------". Please see example below
Quote:
--------------------------------------------------------------------------------------------------------------------------
M-GET CONFIRMATION (
INVOKE IDENTIFIER 346,
LINKED IDENTIFIER 1,
MANAGED OBJECT CLASS alarmRecord,
MANAGED OBJECT INSTANCE {
logId = string : "AIALARM",
logRecordId = number : 341862
},
CURRENT TIME "20080626105012",
ATTRIBUTE LIST {
objectClass alarmRecord,
nameBinding logRecord-log,
managedObjectClass sypObjMAL,
managedObjectInstance { sypAlarmObjectId = "MAL" },
eventType communicationsAlarm,
eventTime "20080609032818",
logRecordId number : 341862,
loggingTime "20080609032819",
packages {
GAAGDA1C.correlatedNotificationsPackage,
GAAGDA1C.additionalInformationPackage, eventTimePackage
},
probableCause SAXBAA0C.lossOfSignal,
perceivedSeverity cleared,
correlatedNotifications { { correlatedNotifications { 23147 } } },
additionalInformation {
{
identifier alarmIdentification,
information AlarmIdentification : "CLASS=PCMMAL LTG=13-08 DIU=1"
}
}
}
)
--------------------------------------------------------------------------------------------------------------------------
M-GET CONFIRMATION (
INVOKE IDENTIFIER 347,
LINKED IDENTIFIER 1,
MANAGED OBJECT CLASS alarmRecord,
MANAGED OBJECT INSTANCE {
logId = string : "AIALARM",
logRecordId = number : 341863
},
CURRENT TIME "20080626105012",
ATTRIBUTE LIST {
objectClass alarmRecord,
nameBinding logRecord-log,
managedObjectClass chargingFailure,
managedObjectInstance { chargingFailureId = 1 },
eventType processingErrorAlarm,
eventTime "20080609173506",
logRecordId number : 341863,
loggingTime "20080609173507",
packages {
specificProblemsPackage, notificationIdentifierPackage,
proposedRepairActionsPackage, additionalTextPackage,
eventTimePackage
},
probableCause SAXBAA0C.storageCapacityProblem,
specificProblems { specProb-chargingFailure-sp5 },
perceivedSeverity critical,
notificationIdentifier 33589625,
proposedRepairActions { propRA-chargingFailure-alarm1 },
additionalText "SAMAR FULL : IA.ICITR"
}
)
--------------------------------------------------------------------------------------------------------------------------
|
So my problem is, i need to find all texts that have the keyword "GAA", but i need to see everything that is between the --------- lines. Desperatedly need a script to do this. Any help is appreciated. Thanks !
|