List, I've got a bash script, that executes other scripts (wow!) and the sub scripts return a value. How can I get the parent script to capture that return value? I've been all over the BASH manual (more than one hour) and Google, still no luck.
What I've tried (I can feel I'm close) [ Version 0.1 - Doesn't get return value/exit status ] for I in 2004 2005 do CMD="./myscript.php $I" $CMD done [ Version 0.2 - Thought this was it, it's not ] for I in 2004 2005 do CMD="./myscript.php $I" RET=$@ TOTAL=TOTAL+RET done echo $TOTAL [ Version 0.3 - The sub scripts output to STDOUT doesn't show ] for I in 2004 2005 do CMD="./myscript.php $I" RET=`$@` TOTAL=$TOTAL+$RET done echo $TOTAL TIA David Busby Systems Engineer [EMAIL PROTECTED] -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list