Forum Discussion
Anonymous
5 years agoGroovy doesn't require semicolons. Also, you can't printlin(cli.before()) before you define what cli actually is.
If you do:
cli=Expect.open(host, user, pass); println(cli.before())
You need to give your device some time to respond before printing out what has been received so far. I also just remembered that you can do println(cli.stdout()) as well. So, maybe something like this:
cli=Expect.open(host, user, pass);
sleep(10000)
println(cli.stdout())
Which would login, wait for 10 seconds for the device to log you in and present the command prompt. Then println(cli.stdout()) prints out everything that has been sent back and forth to the moment.
Related Content
- 2 years ago
- 3 months ago
- 2 years ago