Please help me in writing my script

hello all,

I have a script, used to search for the strings from the set of 5 similar pattern file from the log dir. So here it goes . The input parameter is a part of the file name. When during the script execution, the script should parse the input parameter to original file's with the same pattern. Example Given below:


./XMLsearch.sh CaseManagementService

This script reads from 3 input Files.

1st File: Where strings have been stored.
2nd File: Where the File pattern are stored along with the original file-names & paths been defined , but this is not an archive files.
3rd File: Contains File Patterns , along with the original filenames & paths been defined , but this is an archive files (gz) format.


Content of 1st File

cat ${HOME}/config/stringFile.txt
414d51204450303141504420202020204c91dcdb2d7488c0

Content of 2nd File & 3rd File, Please check the attachment

Please do find the script attached with this, and guide me where shall input parameter should be parsed and how.

From the above syntax, the input parameter

[CaseManagementServic] should be parsed and should search string
[414d51204450303141504420202020204c91dcdb2d7488c0]
in all the 5 CaseManagementService log file

/logs/production/App/tranlogs/CaseManagementService_Log1
/logs/production/App/tranlogs/CaseManagementService_Log2
/logs/production/App/tranlogs/CaseManagementService_Log3
/logs/production/App/tranlogs/CaseManagementService_Log4
/logs/production/App/tranlogs/CaseManagementService_Log5

Like this i have 100+ file patterns in the IN_PUT FILE, whenever i run the script I use the part of the filename as an parameter which should be parsed and start searching in all 5 logs files associated with FILE_Pattern as positioned in the files.

Can anybody please assist me on this., Any help will be appreciated....