LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   searching for Text within files. (https://www.linuxquestions.org/questions/linux-software-2/searching-for-text-within-files-562743/)

waelaltaqi 06-18-2007 02:40 PM

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?

pwc101 06-18-2007 02:46 PM

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.

waelaltaqi 06-18-2007 02:56 PM

it worked.
 
thanks ... easy enough


All times are GMT -5. The time now is 11:42 PM.