Hi all,
I'm trying to glue a simple expect script that spawn's a process (in my case 'scp'), wait's for its completion and then exits with the exit code of the scp.
Should be very simple, but I'm not familiar with TCL's syntax. Could someone please post a source code example that does what I need?
From what I understand, it needs to be:
spawn (and get the $spawn_id)
expect (I have this covered - you may just skip this part)
wait
set scp_exit_code (this is my main problem due to lack of syntax and probably general ignorance in the tcl/expect field)
exit $scp_exit_code
...
Thanks a lot everybody!
Jean
Jean Spector
QA Team Leader @ Kashya Ltd.
I'm trying to glue a simple expect script that spawn's a process (in my case 'scp'), wait's for its completion and then exits with the exit code of the scp.
Should be very simple, but I'm not familiar with TCL's syntax. Could someone please post a source code example that does what I need?
From what I understand, it needs to be:
spawn (and get the $spawn_id)
expect (I have this covered - you may just skip this part)
wait
set scp_exit_code (this is my main problem due to lack of syntax and probably general ignorance in the tcl/expect field)
exit $scp_exit_code
...
Thanks a lot everybody!
Jean
Jean Spector
QA Team Leader @ Kashya Ltd.