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
How to find a particular word in perl Harikrishna Shell Programming and Scripting 2 04-10-2008 12:35 AM
Find a word and delete the line gsusarla UNIX for Dummies Questions & Answers 1 04-02-2008 11:45 AM
find a word in a file, and change a word beneath it ?? vikas027 Shell Programming and Scripting 2 02-13-2008 01:23 PM
sed find word ending with eltinator Shell Programming and Scripting 2 08-22-2007 03:26 PM
find word and relace VI singh85 Linux 1 01-30-2004 09:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-04-2007
Registered User
 

Join Date: Jun 2007
Posts: 45
How can find exactly word in Unix?

How can find exactly word in Unix?

Hi all?

I have on fine it contains data like:

Recalculation Dates started
Performance History Recalc Scheduling started
Recalculation started
New Recalculation started


But I want output like:

Recalculation started(3rd line)

So , please help on this. I was tried through grep command.
Like: grep "Recalculation started" avg_configfile
Out put:
Recalculation started|1476|
After-tax Recalculation started|17|
Reply With Quote
Forum Sponsor
  #2  
Old 07-04-2007
Playing with Ubuntu Now!
 

Join Date: Oct 2005
Location: Chennai
Posts: 364
start of line?

If the pattern that you are trying to match starts at the beginning of the line, then
Code:
grep ^'Recalculation started' avg_configfile
should work. Try to see what kind of pattern that you are trying to match and then decide on how to match it.
Reply With Quote
  #3  
Old 07-04-2007
kamitsin's Avatar
Registered User
 

Join Date: Nov 2006
Location: /dev/null
Posts: 177
Code:
nl <file-name> | grep "Recalculation started"
Reply With Quote
  #4  
Old 07-04-2007
Registered User
 

Join Date: Jun 2007
Posts: 45
Thanks

I t's working......
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:38 PM.


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

Content Relevant URLs by vBSEO 3.2.0