Need to know abt script that invokes batches and get d log files if batches failed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to know abt script that invokes batches and get d log files if batches failed
# 1  
Old 06-29-2007
MySQL Need to know abt script that invokes batches and get d log files if batches failed

hi ,
I need to know commands to be used in the script to invoke batches in order from other scripts and then run those batches,and how to take those logs of those batches which fails........If anyone give me a better idea to complete this entire task in a single script...
# 2  
Old 06-29-2007
er, batch

or at
# 3  
Old 06-29-2007
its actually a batch to create an announcements..And if any of the batches fails it should stop the process to proceed further
# 4  
Old 06-29-2007
put in a script and batch this as one,

Code:
#!/bin/ksh -e
script1
script2
script3

or
set -o errexit


will fail a script on an error
# 5  
Old 06-29-2007
thanx ...Bt hw do u get the log files if those batches fails
# 6  
Old 06-29-2007
Code:
#!/bin/ksh -e
script1 > script1.log 2>&1
script2 > script2.log 2>&1
script3 > script3.log 2>&1

or
Code:
#!/bin/ksh -e
script1  > script.log 2>&1
script2 >> script.log 2>&1
script3 >> script.log 2>&1

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script to take cPanel backup in batches

I'm trying to resolve the below scenario by writing bash script. On my managed linux server I have about 30 accounts and there is not enough space to generate full 30 accounts backup in one go and transfer it via SFTP to my Backup Synology Server. What I'm thinking of doing is breaking the... (3 Replies)
Discussion started by: humble_learner
3 Replies

2. Shell Programming and Scripting

Loop over array in batches

given an array of filenames files=(*) how can i loop over these in batches of four, or even better, work always with four files simultaneously. i want do something with these files, always four of them simultaneously, and if one is ready the next should start. one idea, but definitely not... (2 Replies)
Discussion started by: dietmar13
2 Replies

3. UNIX for Advanced & Expert Users

Need A Script To List All Failed Log In Users

I need to list all the failed log in users as part of audit report. How can I do so in Linux to find all the audit log records and then upload to a table for future reference. I am using oracle 10g on Linux. Hope I will get a quick response from the experts. Thanks in advance for the tips. (3 Replies)
Discussion started by: oraQ
3 Replies

4. Shell Programming and Scripting

plz help normal doubt abt shell script

How to print a only files and not directories in a path. for exam :a user consists both files and directoris in his path. i have to write a script to display only files not dirctories. and only dirctories not files. Advance thanks to forum members.:) (5 Replies)
Discussion started by: sivaranga001
5 Replies

5. Shell Programming and Scripting

Running batches of files at a time from a script

Hi I have a script that performs a process on a file. I want to know how to include a function to run a batch of files? Here is my script #!/bin/bash #---------------------------------------------------------------------------------------------------------------------- #This... (2 Replies)
Discussion started by: ladyAnne
2 Replies

6. UNIX and Linux Applications

Processing batches of files at a time

Hi I would like to run my script to process as many as 50 files at a time. Currently my script is being called like so: ./import.sh -f filename so I want to call my script in this way and it must execute every file in the directory /var/local/dsx/import (1 Reply)
Discussion started by: ladyAnne
1 Replies

7. Shell Programming and Scripting

We need a script that invokes the sql query every 14 days ans send email

HI, We need a script that invokes the sql query every 14 days ans send email (0 Replies)
Discussion started by: bujjisveeru
0 Replies

8. Shell Programming and Scripting

We need a script that invokes the sql query every 14 days ans send email

Hi, We need a script that invokes the sql query every 14 days ans send email (0 Replies)
Discussion started by: bujjisveeru
0 Replies

9. UNIX for Dummies Questions & Answers

How to group lines into batches

Hi all I need to group all the lines that start with 2. For every 3 lines (that start with 2) i need to group them in one group and add 1 for each group. I need your help to batch the files content.The file look like this: 040171011140820070000000009650244002933170003000000075272... (2 Replies)
Discussion started by: ashikin_8119
2 Replies
Login or Register to Ask a Question