( file="iplist.txt" while read line do echo $(telnet $line) done <"$file" ) >> output2.txt
but the script completed immediately when it should take 30 mins as there are 200 ip ports. Also, did not see any output in the generated output2.txt file. Is my syntax incorrect ? Any solutions please ??