Let me first explain what I’m trying to do. I have written a very
simplistic ruby telnet script. It logs in and can send one command I
give from the command line.
What I need, or want, to do is have a file which contains multiple
commands I would like to have executed on the switch I am connecting to
The script and a sample of the file are attached.
I currently have not removed the command line argument for passing in
the telnet command but it is not used so using a -c “nothing” gets me
past that. If and when I can get the source file working I will change
that for naming the file.
I get a failure in the for loop "C:Ruby Scripts/Telnet.rb:54:in
<main>': undefined methodeach’ for #String:0x2949e58
If I enter a telnet.cmd line for each command it works but then it
limits the flexibility of being able to have multiple files with
Thank you for any assistance. It would be greatly appreciated.