The UNIX and Linux Forums  

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
grep question tim-bobby UNIX for Dummies Questions & Answers 4 10-05-2007 08:58 AM
Question about GREP Adriel UNIX for Dummies Questions & Answers 16 03-22-2007 04:03 AM
Another grep question kingdbag UNIX for Dummies Questions & Answers 6 10-26-2006 10:56 PM
grep & sed question der Kopf Shell Programming and Scripting 1 11-22-2004 12:49 AM
Grep question eloquent99 UNIX for Dummies Questions & Answers 4 02-20-2003 06:49 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Dec 2007
Posts: 10
Stumble this Post!
Grep question.

Hi,

I am executing the below command.

grep ".UPDATE" file1.txt | grep -v MQQUEUE > Myprog1

The expected output is all lines in file1.txt which have the string ".UPDATE" and dont contain the string MQQUEUE.

However, the output which I am getting is just searching for the string "UPDATE" instead of ".UPDATE".

Please advise where I am going wrong.

TIA.
Saurabh
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-10-2007
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 709
Stumble this Post!
'.' means the same thing as 'any one character' in a regular expression. Escape the '.' by either putting a \ in front of it or using single quotes instead of double quotes.
Reply With Quote
  #3 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Dec 2007
Posts: 10
Stumble this Post!
Smile

Thanks for your response. It worked.
Reply With Quote
  #4 (permalink)  
Old 12-10-2007
Users Awaiting Email Confirmation
 

Join Date: Dec 2007
Posts: 1
Stumble this Post!
ftp access to specific user

how to give ftp access to specific user as root.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0