Hi I have a shell script where in it, it has these lines
nohup ./mdmctl start-t -dep zg & nohup vmstat 10 > $log_location/vmstat_$1.log & echo "Wait to come up...sleep for 100 secs" sleep 100 echo "Starting prstat." pid=`ps -ef|awk '/'"java -server -XX:CompileThreshold"'/ && !/bash/ {print $2}'` echo "pid = $pid" ./test_prstat $pid > $log_location/prstat_$1.log & echo "pid = $pid" where mdmctl and test_prstat are additonal separate shell scripts. When running Ant, its output s [rexec] Wait to come up...sleep for 100 secs [rexec] Starting prstat. [rexec] pid = [rexec] pid = [rexec] prstat: illegal argument -- -n Terminate batch job (Y/N)? y But when I tried running the shell script directly on a unix shell, it works just fine, giving output # zach_starttest 88770099 Sending output to nohup.out Waiting for iMDM server to come up...sleep for 100 secs Sending output to nohup.out I like to know if there's a way in Ant to detect "Sending output to nohupout" response from remote unix host so that my Ant script wouldn't hang on step [rexec] prstat: illegal argument -- -n I have to terminate the Ant script on my own. Thanks