The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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



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.

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 11:35 AM
complicated search within file mmike Shell Programming and Scripting 7 10-06-2008 02:51 PM
Script required to get a required info from file. Pls. help me. ntgobinath Shell Programming and Scripting 2 05-31-2008 08:34 AM
More complicated log parsing sjug Shell Programming and Scripting 25 06-13-2007 09:33 AM
Very complicated script.. rocinante Shell Programming and Scripting 5 06-08-2007 10:56 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Display Modes
  #8 (permalink)  
Old 5 Days Ago
Scrutinizer Scrutinizer is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 584
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 5 Days Ago
ahmad.diab's Avatar
ahmad.diab ahmad.diab is offline
Registered User
  
 

Join Date: May 2008
Location: Amman Jordan in MEA
Posts: 227
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 5 Days Ago
badoshi badoshi is offline
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 4 Days Ago
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
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 On




All times are GMT -4. The time now is 02:09 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