Shell script - paralllel reading problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script - paralllel reading problem
# 1  
Old 02-23-2010
Shell script - paralllel reading problem

I have a shell script which has awk utlilty,also,in it. This a single script that many other jobs (informatica) using. Each job ll generate a log file. This script will read the particular log file and need to give output. The log file is act as input file for the script. So , a single script used to read many log files, if we run the jobs parallel.


When i run all the jobs parallel, for few jobs ,the script works fine and give output propely. But for 4 to 8 jobs (out of 80 jobs) alone the script not at all reading the log file.


Can you please help me on this. Why the script behaves in this manner ? What should I do, so that the script will work fine , even in the parallel job run. ?

thank you
Gops

Last edited by Scott; 02-23-2010 at 08:06 AM.. Reason: Formatting
# 2  
Old 02-23-2010
Did you check if the log files were already created for those 4 to 8 jobs that failed to read it. Perhapes there might have been a timing issue of when the job was trying to read and the log wasn't created. It will make sense to put a check in the script to verify that the log files are created before it tries to read it. How is the script executed? How are the log files generated and in what format?


cheers,
Devaraj Takhellambam
# 3  
Old 02-23-2010
Yes Devaraj,

the script look for temp file the path of the log file is mentioned. Its reading the temp file properly. But the script could not pick the actual log file that mentioned in the temp file, for those 4-8 jobs alone. Ya .. the log file is being created for those jobs. Execution sequnceis like


job--->job-log--->script execution-->output of script


But if I run the job one by one , all the jobs succeeded
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error in reading variable in shell script

Hello all, I have small script: # SCRIPT COMMONFILEPATH=$WORKDIR/samples/... (4 Replies)
Discussion started by: emily
4 Replies

2. Shell Programming and Scripting

Error while reading from a file in shell script

Hi All, I'm writing a script to read a file line by line and then perform awk function on it. I am getting an error . My file has one name in it "James". I'm expecting my o/p to be youareJamesbond James ./users.sh: line 7: =: command not found #script to read file line by line #adding... (5 Replies)
Discussion started by: Irishboy24
5 Replies

3. Shell Programming and Scripting

[SH] Problem reading input in script

Alright, so the goal of my script is to read text from standard input and store it into a file using the ex-editor: so far i've got this, but it doesn't work. #!/bin/s read text ex $1 >> HERE text HERE I don't get any errors either, so i don't know what i'm doing wrong. (7 Replies)
Discussion started by: Bertieboy7
7 Replies

4. Shell Programming and Scripting

Reading the Properties File From Shell script

Hi, I am new to the shell script please I need help for following question. I have properties file name called "com.test.properties" I have No of key values in this properties. com.person.name = xyz com.person.age = 55 com.person.address = hello I want read this properties but i... (1 Reply)
Discussion started by: venukjs
1 Replies

5. Shell Programming and Scripting

Reading from Keyboard - Shell Script

How do i read from kb using shell script but i need to read it from same line. Script :- echo "Please Enter Your Choice " read CHOICE But it goes to next line i need it to read it next to Choice and not new line. (4 Replies)
Discussion started by: dinjo_jo
4 Replies

6. Shell Programming and Scripting

reading from stdin in a shell script

Hello, I've managed to get my .procmailrc file to work. At least it triggers a script which creates a file. But the file is empty. How do I get at the data that's been piped? I've done much creative googling to no avail. I belive it should be in stdin, but I can't figure out how to access... (4 Replies)
Discussion started by: mmesford
4 Replies

7. Shell Programming and Scripting

File reading problem via shell script

Hi, Data file named parameter contains : DB=y Alter_def.sql Create_abc.sql SQL=y database.sql my_data.sql To read this file I use var_sql=$(awk -F= '$1 == "SQL" { print $2 }' parameter.txt) if then sql_f_name=`grep "\.sql" parameter.txt` echo $sql_f_name fi (2 Replies)
Discussion started by: Dip
2 Replies

8. Shell Programming and Scripting

file reading through shell script

For reading a file through shell script I am using yhe code : while read line do echo $line done<data.txt It reads all the line of that file data.txt. Content of data.txt looks like: code=y sql=y total no of sql files=4 a.sql b.sql c.sql d.sql cpp=n c=y total no of c files=1 (4 Replies)
Discussion started by: Dip
4 Replies

9. Shell Programming and Scripting

Shell Script -- problem reading backslash(\)!!

Hello! I am writing a program that reads a bunch of arguments from the command line,then read information from a file(passed as one of the arguments) and do some computation. The problem I am facing is when a backslash(\) is present as one of the arguments, suppose $ myprog \ abc xyz,the backslash... (2 Replies)
Discussion started by: rossi143
2 Replies

10. Shell Programming and Scripting

Reading a table in a shell script

Dear all: I want to write a script capable of reading specific rows and collumns of a table, into a variable. Just imagine i have a file named table.dat which contains: GENERAL INFORMATION Col 1 Col2 Col3 1 1 2 2 3 3 4 4 What i want to do... (13 Replies)
Discussion started by: luiscarvalheiro
13 Replies
Login or Register to Ask a Question