I have a script that works from terminal, or if I execute system script run test, but will not run by clicking run script or using scheduler. All this does is read a list of IP addresses, ssh into the RB and do a reboot. I am using ROS 6.17. Any ideas?
ok so I tried your script with a couple of modfications. For testing purposes I am using the following:
:global arrayofip [:toarray [/file get [/file find name="Iptest2.txt"] contents]];
:do {
:foreach ip in=$arrayofip do={:put $ip;}
}
This works great with one exception. The output contains an addition line. My text file contains 2 ip addresses in this format, x.x.x.x,x.x.x.x I have also tried with x.x.x.x,x.x.x.x, which gives me a second extra line. This does not affect the functionality other than it gives an error because the last line is not an ip address. I have tried a couple of different solutions to stop after the last ip is read but am having no luck. using while (:pick $ip != “”) throws an infinite loop.. what is the best way to find the last entry?
Oh and yes Rex, I have borrowed parts of your code for a number of things.