The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Emergency UNIX and Linux Support !! Help Me!!
.
grep unix.com with google



Emergency UNIX and Linux Support !! Help Me!! Post your urgent questions here for highest visibility. Posting a new thread to this forum requires Bits. We monitor this forum to help people with emergencies, but we do not guarantee response time or answers. This forum is "best effort" only. Members who reply to posts here receive a bonus of 1000 Bits per reply.

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #8 (permalink)  
Old 11-15-2009
Registered User
 

Join Date: Nov 2008
Location: Amsterdam
Posts: 1,259
Hi Ahmad, scottn's code works well. In your example you left out the double quotes after the second DESCRIPTION, which are part of the format.
  #9 (permalink)  
Old 11-15-2009
ahmad.diab's Avatar
Registered User
 

Join Date: May 2008
Location: Amman Jordan in MEA
Posts: 416
Quote:
Originally Posted by Scrutinizer View Post
Hi Ahmad, scottn's code works well. In your eaxmple you omitted the double quotes after the second DESCRIPTION, which are part of the format.
You are right man my bad
  #10 (permalink)  
Old 11-15-2009
Registered User
 

Join Date: Mar 2009
Posts: 34
many many thanks to everyone that replied, the first bit of code I tried worked a treat, so stuck with that for the moment:


Code:
awk '
  { $1 = $1 }
  /DESCRIPTION/ { p=" "; next }
  p { p=p" "$0; if (/"$/) {gsub(/ *"/,"",p); print p;p=""}}
' infile

I'll be looking through the rest of the given examples too - it's definitley a useful skill to have. You guys are a real lifesaver!
  #11 (permalink)  
Old 11-16-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,903
Wink

Quote:
Originally Posted by badoshi View Post
You guys are a real lifesaver!
Wow, I didn't realize hospitals were using SNMP in their cardio defibrilators!
Sponsored Links
Reply

Bookmarks

Tags
awk, mib, parsing, snmp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Getting required fields from a test file in required fromat in unix rdhanek Shell Programming and Scripting 7 07-22-2009 12:35 PM
complicated search within file mmike Shell Programming and Scripting 7 10-06-2008 03:51 PM
Script required to get a required info from file. Pls. help me. ntgobinath Shell Programming and Scripting 2 05-31-2008 09:34 AM
More complicated log parsing sjug Shell Programming and Scripting 25 06-13-2007 10:33 AM
Very complicated script.. rocinante Shell Programming and Scripting 5 06-08-2007 11:56 AM



All times are GMT -4. The time now is 02:56 PM.


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