Shell Help

Simon Wistow simon at thegestalt.org
Mon May 14 16:03:16 BST 2007


In a shell script I'm launching an app which is particularly chatty and 
wants to spew a load of stuff to the command line as it starts up. 
Unfortunately it also spews its error messages to stdout WHICH MAKES 
SIMON ANGRY.

My solution is

    output=`chatty_app`;
    if [ -z "$!" ]
    then
       echo "Erk - failure!";
       echo "$output";
    fi


And all is well and good. The problem is that chatty_app also doesn't 
background itself but putting 

    output=`chatty_app &`;


doesn't work i.e it never gets to the test so non of the other stuff I 
want running (which must run after chatty_app) works.

Anybody got any ideas?

Simon



   



More information about the london.pm mailing list