1

Script for telnet and run one command kill it and run another command using while loop

view story
linux-howto

http://www.unix.com – Code: ( sleep 3  echo ${LOGIN}  sleep 2  echo ${PSWD}  sleep 2  while read line  do  echo "$line"  PID=$?   sleep 2   kill -9 $PID done < temp  sleep 5  echo "exit" ) | telnet ${HOST} while is executing only command and exits. (HowTos)