echo  -e '\n'

for example:

here we will save configure file of  H3C Switch

#!/bin/baships_file="/root/Desktop/ips.txt"

while read ip ; do

( echo 'youname'

sleep 1

echo 'youpassword'

sleep 1

echo 'system-view'

sleep 1

echo 'ntp-service unicast-server 192.168.207.88'

sleep 1

echo 'quit'

sleep 1

echo 'clock timezone beijing add 8:00:00'

sleep 1

echo 'display ntp-service status'

sleep 1

echo 'display ntp-service session'

sleep 1

echo 'save'

sleep 1

echo 'y\n'

sleep 1

echo -e '\n'

sleep 1

) |telnet ${ip}

done < ${ips_file}