LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-18-2007, 03:40 PM   #1
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Rep: Reputation: 31
searching for Text within files.


i have a problem with a spamassassin rule. I know which rule but i don't know which file the rule is saved into. The rule name is BIZ_TLD
Code:
#cd /etc/mail/spamassassin
#cat * | grep "BIZ_TLD"
and it's coming back with this:
Code:
score BIZ_TLD           1.022   # Increased from 0.7: JGRAY 21-Feb-2005
i simply want to remove the above line but i don't know in which file it's located.
i tried:
Code:
#cat *.cf | grep -l "BIZ_TLD"
which is coming back with this output:
Code:
(standard input)
any ideas?
 
Old 06-18-2007, 03:46 PM   #2
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by man grep
-H, --with-filename
Print the filename for each match.
So:
Code:
grep -H "BIZ_TLD" *
would output the filename in which the matching text was found.
 
Old 06-18-2007, 03:56 PM   #3
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Original Poster
Rep: Reputation: 31
it worked.

thanks ... easy enough
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LQ searching with text browsers dive LQ Suggestions & Feedback 1 12-31-2006 12:16 PM
Searching for text within pdfs - possible? will103 Linux - Software 6 12-05-2005 10:41 AM
text searching sopiaz57 Linux - Software 4 06-02-2005 02:00 PM
Searching text files by content will103 Linux - Software 1 01-24-2005 08:43 AM
searching inside text files minm Linux - Newbie 2 01-09-2005 12:56 AM


All times are GMT -5. The time now is 07:51 PM.

Main Menu
Advertisement
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