develooper Front page | perl.beginners | Postings from March 2003

Find Text in files

Thread Next
From:
James Ferree
Date:
March 26, 2003 05:46
Subject:
Find Text in files
Message ID:
20030326134645.294.qmail@web80306.mail.yahoo.com
Hi,

I am looking to write a script that will look in a
file for a list of text strings to search for like

req_aaaa
req_bbb
req_ccc

and search all the files in a subdirectory and below
for the string, if it is found, then it prints out the
the original string followed by the file name for each
instance where it is found.  If it gets through all
the files and finds none, the it prints out the
original string and the Words NOT FOUND.

Thanks for any help,
Jim

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About