LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-29-2008, 08:17 PM   #1
subnet_rx
Member
 
Registered: Oct 2001
Distribution: Ubuntu 9.10
Posts: 148

Rep: Reputation: 15
find exact phrase


I'm having trouble figuring out how to use find to find an exact phrase within files, and not something that is a part of another word. For instance, searching for var, I would not want variable to match.
 
Old 03-29-2008, 08:28 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Code:
grep '\bvar\b'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
find the exact location of a running exec file cahdecah General 4 08-16-2007 10:53 AM
Find/locate an exact file stefaandk Linux - General 2 12-27-2005 07:56 AM
how to find an exact substring match? ldp Programming 7 02-22-2005 06:28 AM
grep a phrase degraffenried13 Linux - General 1 04-04-2004 11:10 AM
grep [exact phrase] chrisfirestar Linux - General 2 02-09-2004 04:30 AM


All times are GMT -5. The time now is 04:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration