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
Required info on Pstack on solaris10 rajendra44 UNIX for Advanced & Expert Users 0 06-02-2008 09:46 AM
Help required with a Csh script to read data from a file fizzme Shell Programming and Scripting 1 05-29-2008 08:30 PM
Required Script shameeque Windows & DOS: Issues & Discussions 3 02-14-2007 04:19 AM
Urgent help required in deleting a line without opening a file usinga shell script naan Shell Programming and Scripting 6 07-20-2006 04:42 AM
UNIX PATH info required PLEASE HELP (I'm new to unix) akitachi UNIX for Dummies Questions & Answers 1 05-10-2002 03:37 PM

 
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 05-29-2008
ntgobinath ntgobinath is offline
Registered User
  
 

Join Date: May 2008
Posts: 38
Script required to get a required info from file. Pls. help me.

Hi All,

I have Information in the file like,

============ Interface Information ====================
+++++++++++++++++ NMInterface ++++++++++++++
ObjID:251c55a2-2257-71dd-0f68-9887a1f10000
NNMObjID:82857
EntityName:aust00m1.mis.amat.com[ 0 [ 161 ] ]
Description:ATM9/0/0-atm layer
Discovered in Zone:0
EntityType:Interface
IPLevel:4
OverallStatus:NotMon
OADId:0
StatusChangeTime:0
CreateTime:1210839357
ChangeTime:1210839357
Containment Parent:aust00m1.mis.amat.com(1d5ebb70-2257-71dd-0f68-9887a1f10000)
==========Interface Property===============
VPI:0
VCI:0
BoardNo:-
PortNum:0
AuxPortNum:0
IfIndex:161
IfName:AT9/0/0
IfAlias:-
IfType:37
PhysicalAddress:-
L2DomainID:-1
IfOperStatus:2
IfAdminStatus:2
VlanPortType:2001689792
isDiscoContrivedIF:0
IfSpeed:0
IF Capability :


Requirement:

Whenever the string matches "+++++++++++++++++ NMInterface ++++++++++++++" then It should print the following informations.
EntityName:
OverallStatus:
IfName:

Example result:

EntityName:aust00m1.mis.amat.com[ 0 [ 161 ] ]
OverallStatus:NotMon
IfName:AT9/0/0


Note: File contains mutiple records. The above example is one record.

If the string match again it should do the same operation.

I attached example file in this thread. Pls. provide me a script for this requirement.


Thanks,
Gobinathan.S
 

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 10:30 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