[torqueusers] Qsub interactively (-I), Expect and standard output problem

Charles V. charles.vejnar at isb-sib.ch
Wed Jun 25 12:17:10 MDT 2008


Hi,

I would like to be able to use "qsub -I" in a script. In this script, I want 
to have the standard output of the job.

I started with an Expect script:

#!/usr/bin/expect -f
# Submit interactive job
spawn -noecho /usr/local/torque/bin/qsub -I
# Give job some commands
send "date\r"
send "echo \"Hello\"\r"
expect -re ".*llo"
send_user "B$expect_out(buffer)E\n"
send "exit\r"
# Wait for qsub exit
wait
# Quit
exit

But the output is:
date
echo "Hello"
Bdate
echo "HelloE

I get my commands back but not their results. Do you have any idea to explain 
this behaviour ? Any solution(s) ?

Thanks

Charles


More information about the torqueusers mailing list