I want to pass array in argument in such a way suppose process.rb is my script and the argument will be like:
i/p
process.rb server{1..4}
process.rb prodserver{2..3}
process.rb devserver3
The process.rb should accept all the inputs and parse it in such a way that when I print the variable which holds the arguments give me below result.
o/p
puts arguments
server1
server2
server3
server4
or
prodserver2
prodserver3
or
devserver3
I have a shell script which does the same:
for i in "$@"
do
echo $i
done
i/p
server{1..4}
o/p
server1server2server3server4
I wanted to have the same logic in the ruby. Since I am a new bie in ruby I am not able to find the same on google. Please let me know how I can get this output or any article about the related to my question