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 > 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.

Closed Thread
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
  #1 (permalink)  
Old 02-24-2009
gingburg gingburg is offline VIP Member  
Supporter
  
 

Join Date: Oct 2008
Posts: 41
Awk something in ()

Hello All,

How do I awk the lines that contain, UMP4(SDTQ).

Thank you
  #2 (permalink)  
Old 02-24-2009
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Cool

Can you provide a sample of the original file, and what you want awk to do?

To find lines that contain something is typically a grep, as in

Code:
grep "UMP4(SDTQ)" inputfile >outputfile
  #3 (permalink)  
Old 02-24-2009
gingburg gingburg is offline VIP Member  
Supporter
  
 

Join Date: Oct 2008
Posts: 41
Sample

I have a program called chem.awk that i have attached. Usually after the awk it read /Done/ and finds all lines that match done. But now i need to awk UMP4(SDTQ).

Note i changed my program extension from awk to txt.
Hope that helps.

Thank you, Lenny
Attached Files
File Type: txt chem.txt (923 Bytes, 7 views)
  #4 (permalink)  
Old 02-24-2009
Franklin52 Franklin52 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,306
Quote:
Originally Posted by gingburg View Post
Hello All,

How do I awk the lines that contain, UMP4(SDTQ).

Thank you
Code:

awk ' /UMP4\(SDTQ\)/{do something...}' file
Regards
  #5 (permalink)  
Old 02-24-2009
gingburg gingburg is offline VIP Member  
Supporter
  
 

Join Date: Oct 2008
Posts: 41
Thank you

THANK YOU very much it worked perfectly.
Closed Thread

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 05:34 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