From: Bob Ford Date: 2013-03-06T07:25:04+09:00 Subject: Re: telnet - how to loop through commands listed in a file Bob Ford wrote in post #1100248: > unknown wrote in post #1100227: >> Am 05.03.2013 19:07, schrieb Bob Ford: >>> Hmmm, The files are entered from the command line using a getopt (e.g -f >>> "file1 file2 file3"). >>> >>> I'll look into this some more. Thank you. >>> >> >> "file1 file2 file3".split > > I invoke this script from the commandline like such > > ruby TelnetCmds.rb -h 192.168.1.10 -f "C:\{PATH_TO_FILE}\File1 > C:\{PATH_TO_FILE}|File2" > > I've been trying to convert that string to an array but I get the same > error. > > filenames = "#{$file_arg}.split(" ")" I got it finally: filenames = "#{$file_arg}".split(/ /) Thank you for all the help!!! -- Posted via http://www.ruby-forum.com/.