I am new to waiting and writing scripts in general. I am trying to make several scenarios to make my life a little easier when you choose network device configurations. I managed to create a basic pending SSH script for the device and save the configuration.
I want to expand this and allow the script to connect to multiple IP addresses, not just one, as it is now. I have a file called list.txt with several different IP addresses with each IP address on a separate line.
What do I need to do so that the wait script connects to each of these IP addresses and does the rest of the tasks in the script?
Here is the Expect script I still have:
#!/usr/bin/expect -f
Do I need to integrate this with a Bash script? If so, is it possible to read one line of the list.txt file, use it as an IP / host variable, and then read the next and repeat?
source share