Results 1 to 6 of 6
hey all,
I am writing a bash script to get a file from a server, untar it and do some things with the content. once its done go back to ...
- 03-05-2007 #1Just Joined!
- Join Date
- May 2006
- Posts
- 39
bash scripting..how to make it go line by line.
hey all,
I am writing a bash script to get a file from a server, untar it and do some things with the content. once its done go back to the server and get the next file in the sequence and do the same to that file. thing is...when it is done the stuff to the contents it doesn wait till its done...it goes back to the top of the loop and starts again. and this messes with what is going on with the content of the previous file. I want it to wait till thats done then go back to get the next..i am using a while loop. any suggestions would be greatly appreciated.
OH i am using kettle to do the stuff to with the content of the tar file. Its an ETL process.
-B
- 03-05-2007 #2Linux Newbie
- Join Date
- Jan 2007
- Location
- Cupertino, CA
- Posts
- 157
Are you putting the process that processes the contents in the background? Or does it go to the background by itself? Can you post your script?
- 03-05-2007 #3Just Joined!
- Join Date
- May 2006
- Posts
- 39
i don't know if it is...good question..
Originally Posted by nikunjb
I don't know if kettle command line jobs run in the background...do they? cause thats where the problem occurs...
script snippet:
while [$startDate -le $endDate ] do
do someting
do something.
#now after the above is complete..run this job. the start over
./kitchen.sh -file=myfile.kjb -level=basic -norep=Y
startDate = $startDate+86400
done
- 03-05-2007 #4Linux Newbie
- Join Date
- Jan 2007
- Location
- Cupertino, CA
- Posts
- 157
What does the kitchen.sh script do?
- 03-06-2007 #5Just Joined!
- Join Date
- May 2006
- Posts
- 39
the kitchen script did some ETL function..it loads some data from a couple text files into a database. I however solved my situation. I sourced the .bashrc and bash_profile after each line that takes a while. Not sure how that works...but it works...Thanks for the help.
-B
- 03-06-2007 #6Linux Newbie
- Join Date
- Jan 2007
- Location
- Cupertino, CA
- Posts
- 157
That does not sound like a solution. How did you arrive at it? Can you post your kitchen.sh script as well as the .bashrc and bash_profile. Where did you source it in the main shell script... can you post the new one as well?


Reply With Quote
