Sponsored Content
Top Forums Shell Programming and Scripting background process return code Post 302076206 by jim mcnamara on Friday 9th of June 2006 05:19:33 PM
Old 06-09-2006
start with something like this:
Code:
#!/bin/ksh

>logfile

echo "start time `date`" > logfile

while read file
do
    file_name=`ls $file`;
    (ksh archive.ksh $file_name; echo "$file_name status=$?">> logfile)&
done < $indirect_file
wait

echo "end time `date`" >> logfile
cat logfile

I have not tested this...
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

return code of a process

two programs A and B writting in c++ I am using A to B and I want to know the return code of B. in B ------------------------ int main() { return 11; } ------------------------ in A ------------------------ int main() { system(A); } ------------------------ Is it the right way... (1 Reply)
Discussion started by: filedeliver
1 Replies

2. Programming

return code of a process

two programs A and B writting in c++ I am using A to B and I want to know the return code of B. in B ------------------------ int main() { return 11; } ------------------------ in A ------------------------ int main() { system(A); } ------------------------ Is it the right way... (1 Reply)
Discussion started by: filedeliver
1 Replies

3. Shell Programming and Scripting

How to include RETURN KEY with Background process "&" in Shell Script

Hello All, I am a newbie in Shell script programming, and maybe you can help me with my query. I need to write a shell script (mntServer.ksh) that will start a background process and also to be able to run another script. The mntServer.ksh script contains: #!/bin/ksh... (1 Reply)
Discussion started by: racbern
1 Replies

4. Shell Programming and Scripting

Return code of background process

Hi, I have a process that I run in the background that looks like this ${BASEDIR}/ksh/sqler.ksh ${compnames003} & and I would like to get the return code of the sqler.ksh script. so my code is like this ${BASEDIR}/ksh/sqler.ksh ${compnames003} & retcode=$? (3 Replies)
Discussion started by: c19h28O2
3 Replies

5. Shell Programming and Scripting

return code of multiple java process

Hi, I have a unix shell script which is launching multiple java processes by calling a java class in a loop, but each time with a different set of parameters. Now I have to use the return code from each process in the script later. but how do i obtain the return code from each process... (1 Reply)
Discussion started by: rama354
1 Replies

6. Shell Programming and Scripting

Background process, return code and pid.

Hey all, Okay, this one is tricky and I'm not sure there is a niec way to do it, or indeed anyway to do it. The main issue revolves around timing out a hung ssh. I am doing this by creating a wrapper script for the ssh with the following requirements. My requirements are: Defineable... (5 Replies)
Discussion started by: RECrerar
5 Replies

7. Shell Programming and Scripting

Catch exit code of specific background process

Hi all, i hava a specific backgroud process. I have de PID of this process. At some time, the process finish his job, is there any way to catch the exit code? I use "echo $?" normally for commands. Thanks! (2 Replies)
Discussion started by: Xedrox
2 Replies

8. Shell Programming and Scripting

Capturing the return code from background process

Hi All, I was out not working on unix from quite sometime and came back recently. I would really appreciate a help on one of the issue I am facing.... I am trying to kick off the CodeNameProcess.sh in PARALLEL for all the available codes. The script runs fine in parallel. Let say there are... (1 Reply)
Discussion started by: rkumar28
1 Replies

9. Shell Programming and Scripting

Pass return value of a function in background process

Hi, I have created a function f1 defined in script A.sh .I have called this function in background . But I want to use its return value for another function f2 in script A.sh. I tried declaring it as a global variable, yet it always returns the status as 0. Is there any way with which I can get... (7 Replies)
Discussion started by: ashima jain
7 Replies

10. Shell Programming and Scripting

How to return from background process and check if it is running or not?

Hi Team, i am executing 3 scripts in background from 1 script and i want to send a message once the script gets completed.these scripts usually takes 1 hr to complete. My sample script is below, Vi abc.sh sh /opt/data/Split_1.sh & sh /opt/data/Split_2.sh & sh /opt/data/Split_3.sh & ... (3 Replies)
Discussion started by: raju2016
3 Replies
DDRESCUELOG(1)							   User Commands						    DDRESCUELOG(1)

NAME
ddrescuelog - tool for ddrescue logfiles SYNOPSIS
ddrescuelog [options] logfile DESCRIPTION
GNU ddrescuelog - Tool for ddrescue logfiles. Manipulates ddrescue logfiles, shows their contents, converts them to/from other formats, compares them, and tests rescue status. OPTIONS
-h, --help display this help and exit -V, --version output version information and exit -a, --change-types=<ot>,<nt> change the block types of a logfile -b, --block-size=<bytes> block size in bytes [default 512] -c, --create-logfile[=<tt>] create logfile from list of blocks [+-] -d, --delete-if-done delete the logfile if rescue is finished -D, --done-status return 0 if rescue is finished -f, --force overwrite existing output files -i, --input-position=<bytes> starting position of rescue domain [0] -l, --list-blocks=<types> print block numbers of given types (?*/-+) -m, --domain-logfile=<file> restrict domain to finished blocks in file -n, --invert-logfile invert block types (finished <-> others) -o, --output-position=<bytes> starting position in output file [ipos] -p, --compare-logfile=<file> compare block types in domain of both files -q, --quiet suppress all messages -s, --max-size=<bytes> maximum size of rescue domain to be processed -t, --show-status show a summary of logfile contents -v, --verbose be verbose (a 2nd -v gives more) -x, --xor-logfile=<file> XOR the finished blocks in file with logfile -y, --and-logfile=<file> AND the finished blocks in file with logfile -z, --or-logfile=<file> OR the finished blocks in file with logfile Numbers may be followed by a multiplier: b = blocks, k = kB = 10^3 = 1000, Ki = KiB = 2^10 = 1024, M = 10^6, Mi = 2^20, G = 10^9, Gi = 2^30, etc... REPORTING BUGS
Report bugs to bug-ddrescue@gnu.org Ddrescue home page: http://www.gnu.org/software/ddrescue/ddrescue.html General help using GNU software: http://www.gnu.org/gethelp COPYRIGHT
Copyright (C) 2012 Antonio Diaz Diaz. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. ddrescuelog 1.16 June 2012 DDRESCUELOG(1)
All times are GMT -4. The time now is 10:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy