From: Ryan A. <r....@f5...> - 2004-06-11 01:07:56
|
Hello perl expect list, =20 Please forgive is this is totally obvious, but I've been searching books and on-line searches way too long! =20 Here's my problem. I spawn a ssh session to a remote box, and run a command. If the command is successful, I just get a new prompt, but if it fails, the program spits out an error on STDERR. Currently, $exp_object->exp_before(),$exp_object->match(), and my $exp_object->exp_after() objects contain all the STDOUT info, but no STDERR info. How does one trap the STDERR strings? =20 On a side note, is there a simple way to get the bash return code from a command sent to a spawned ssh shell? Right now I'm doing a "echo $?" and expecting "\d\r" and parsing the string in $exp_object->match(); =20 Thanks!! =20 - Ryan =20 =20 =20 =20 =20 |