#!/bin/bash echo -e "\n" echo "==========================================================" echo "Starting all extenders at : " $(date) echo "==========================================================" # Put the IP addresses of your extenders in the list below declare -a Extenders=("192.168.1.48" "192.168.1.50" "192.168.1.51" "192.168.1.52" "192.168.1.56" "192.168.1.58" "192.168.1.59" "192.168.1.143") sleep 30 # Iterate the string array using for loop for val in ${Extenders[@]}; do { sleep 0.2; echo "root"; sleep 0.2; echo "killall waitpower"; sleep 0.2; } | telnet $val echo -e "======================================================\n" done