Peter wrote:
Hey all...

One of these days I need to learn bash! I need to search through a directory of text files for a particular string and then report the name of the file(s) that contain that string. For example

cat *.txt | grep "event_templates/add.php"

merely reports that two files indeed contain the string but it doesn't tell me which of the 176 files contain the string... Thanks!

You might try:

grep -l "event_templates/add.php" *.txt

(bash has nothing to do with this one)


--
William Astle
finger [EMAIL PROTECTED] for further information

Geek Code V3.12: GCS/M/S d- s+:+ !a C++ UL++++$ P++ L+++ !E W++ !N w---
!D !M PS PE V-- Y+ PGP t+@ 5++ X !R tv+@ b+++@ !DI D? G e++ h+ y?

_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to