Thanks for the reply and info man...
I'll try that..
It will actually run on thousands of servers, thats the problem. this check-dump script will run on each server, and each will remote login to one of 3 or 4 dump repositories
I guess thats why, doing the passwordless login would be a pain, as the 3 to 4 dump servers would have to be made to trust all these 1000 servers on build.
---------- Post updated at 03:15 PM ---------- Previous update was at 03:05 PM ----------
Wow .. now I can set the variable up on the remote machine with the o/p of the df command. I was missing the metacharacters I guess. pheww. Thanks a ton man.
---------- Post updated 07-09-09 at 01:48 PM ---------- Previous update was 07-08-09 at 03:15 PM ----------
Hey.. how do we send an if loop to the remote host ..
i ve tried ..
.....
expect "*"
sleep 1
send "if {\$var > [lindex $argv 0]} {echo true} else {echo false}\r"
interact
...
But it gets stuck at > prompt ... that the if loop is waiting for something..
How do we send this if loop structure to expect ?
---------- Post updated at 02:18 PM ---------- Previous update was at 01:48 PM ----------
Alright , I figured it out...
1 last question..
Now I have the result of the expect script stored in a var $res.
I do a " send "exit \$res\r"
interact
... to return the value $res to calling script ..but if i do a echo $? in from command line
after expect script returns... it always shows return value as 0..