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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Difference grep, egrep and fgrep ravind27 UNIX Desktop for Dummies Questions & Answers 2 06-14-2009 07:37 AM
Egrep cheat sheet anywhere? Looking for meaning of egrep -c leelm UNIX for Dummies Questions & Answers 2 01-11-2008 03:37 PM
help with egrep akDBA UNIX for Dummies Questions & Answers 9 08-02-2006 05:33 AM
need to grep or egrep the running processes in C file jimmynath UNIX for Advanced & Expert Users 5 09-08-2005 04:26 PM
Egrep Help FuzzyNips UNIX for Dummies Questions & Answers 2 11-10-2004 04:25 PM

Closed Thread
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 Rate Thread Display Modes
  #1 (permalink)  
Old 01-19-2006
whugo whugo is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 4
grep/awk/egrep?

Hi,

The input file "notifications" contains the following string.

FRTP has 149 missing batches

I want to search for :

FRTP has missing batches

As the number 149 is not important and will change.

The commands I have tried.

grep "FRTP has.*missing batches" notifications.txt
grep "FRTP has [0-9] missing batches" notifications.txt
awk '$0 ~! /FRTP has.*missing batches/ notifications.txt
egrep "FRTP has [0-9]+missing batches" notifications.txt

I have had no success as yet. Please assist.
  #2 (permalink)  
Old 01-19-2006
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
Code:
sed -n -e 's_FRTP has .* missing batches_&_p' notifications.txt
  #3 (permalink)  
Old 01-19-2006
mahendramahendr mahendramahendr is offline Forum Advisor  
Registered User
  
 

Join Date: Dec 2005
Location: London
Posts: 222
egrep "FRTP has.*missing batches" notifications.txt
  #4 (permalink)  
Old 01-20-2006
mona's Avatar
mona mona is offline
Registered User
  
 

Join Date: Nov 2005
Location: Singapore
Posts: 96
How about this?

egrep "FRTP has [0-9]* *missing batches"
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 04:04 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