LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > unixuser
User Name
Password

Notices


Rate this Entry

How to search for a list of strings saved in a file and then search against log files

Posted 02-20-2009 at 01:10 PM by unixuser

Want unix script to search a list of strings (stored line by line in a file), search all the matching lines of files under directories and subdirectories in different unix machines(not one box diff boxes - all the unix box names and username/password are stored with a comma delimitor in flat file) and piped to a file. THE SEARCH SHOULD BE FAST.

Scenario:

1) searchlist.txt will have like
id1
id2
id3
id4 etc....
2) and the id's should be searched in files under the folder /logs and again /logs might have subdirectories in it. the /logs even might have .gz files also. the id's should be searched even in .gz files also. if any line matches the lines should be piped to result.txt file. the script should be capable of searching in differenct unix boxes.
3) THE SEARCH SHOULD BE VERY FAST as the log files under /logs directory will be in 100's and huge too.......


Early reples will be appreciated.
Posted in Uncategorized
Views 1683 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration