The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
finding duplicates in columns and removing lines totus Shell Programming and Scripting 17 11-29-2008 11:27 AM
finding string at runtime inderpunj Shell Programming and Scripting 1 05-01-2008 04:19 AM
finding a string in a file Ume1986 UNIX for Advanced & Expert Users 2 01-24-2008 07:19 AM
help with finding a string sandyg Shell Programming and Scripting 2 09-28-2007 11:15 AM
Finding part of a string DAFNIX Shell Programming and Scripting 4 09-21-2006 12:24 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-20-2008
aismann aismann is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 37
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 !
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:47 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0