Please correct my script - Needed very urgently


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Please correct my script - Needed very urgently
# 1  
Old 09-28-2010
Please correct my script - Needed very urgently

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:

Code:
./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.

Code:
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

Quote:

[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....
# 2  
Old 09-28-2010
Double post, continued here, thread closed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Help Urgently - ksh Script

Requirement is to list the files older than 365 days from multiple directories and delete them and log the list of files which are deleted to a log file. so 1 script should only list files older than 365 days for each directory separately to a folder The other script should read these files... (4 Replies)
Discussion started by: prasadn
4 Replies

2. Shell Programming and Scripting

Need output of script on screen and file with correct return status of the called script.

Hi, I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed. Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies

3. Shell Programming and Scripting

Help needed urgently. Look back for files in PERL

I have 3 variables $file =abc_2011_11_01.txt (current day file) $back = Yes $forward = No I need to search for 3 days back files / 3 days forward files if my current file is not present logic is, I need to download the current day file. If it is missing, i need to look out for... (1 Reply)
Discussion started by: irudayaraj
1 Replies

4. Shell Programming and Scripting

Script command - need help urgently

I have added script command to the .profile of the id, whose session needs to be captured. When exit command is issued, the script command exits. Is there a way to exit the parent shell also - and log off the system completely with one exit command? (8 Replies)
Discussion started by: ggayathri
8 Replies

5. UNIX for Advanced & Expert Users

Help needed Urgently... Thanks in advance

You have a file called /opt/test/input.txt with the following information: man_aa_bld_100.410.040_CMD 08/14/2008 23:29:21 08/14/2008 23:31:10 SU 5339491/1 man_aa_bld_100.410.050_CMD 08/14/2008 23:29:21 08/14/2008 23:31:11 SU 5339491/1 man_aa_bld_100.410.060_CMD 08/14/2008 ... (3 Replies)
Discussion started by: jkumsi
3 Replies

6. UNIX for Dummies Questions & Answers

Help NEEDED urgently on exceutable file

Hi , i amtrying to execute a file called bcs_maint which is the final executable for our project. Normally on some other servers ican execute it by just typing bcs_maint. yesterday i got a new worksattion for me and when i do the same it says /sbin/sh: bcs_maint : not found. What... (5 Replies)
Discussion started by: jagan_kalluri
5 Replies

7. Shell Programming and Scripting

help needed urgently

hi all i need help I am confused and stucked. Actually i am new in this scripting stuff. I want to give complete txt file as a input to a variable and then sort the data in the file according to the alpha numeric characters, as my text file contains ! and !! and !!! indicating Minor, Major and... (11 Replies)
Discussion started by: nabmufti
11 Replies

8. Shell Programming and Scripting

hi help in writing awk script(urgently)

hi to all i have file like this file.txt this is naryana expect hyderabad is a cool place now climate VISAKHSAPATNAM became very cool #vizag is my birth place #hyderabad is a cool place #now climate of hyd became very cool #vizag is my birth place #hyderabad is a cool place ... (7 Replies)
Discussion started by: LAKSHMI NARAYAN
7 Replies

9. UNIX for Dummies Questions & Answers

Major Help Urgently Needed!!!!

Right deleted Linux partition usig windows then went to format c:\ but had to exit window now pc ONLY boots into GNU Grub. Does anyone know how to format the hard drive now????? (3 Replies)
Discussion started by: billett05
3 Replies

10. Shell Programming and Scripting

Shell Script needed urgently

Hi Frends, I am need of a small shell script. Kindly any body help me by giving me a small shell script to read first line in a file and extract date from the first line and store it in a variable... and after storing it in a variable the first and the last line of the file has to be deleted..... (2 Replies)
Discussion started by: vas_dba
2 Replies
Login or Register to Ask a Question