#================
#First Coding
#=================
#!/bin/bash
SRV_HOST="myserver"
SRV_PORT="7777"
SRV_USER="SrvUser"
SRV_PASSWORD="SrvPassword"
telnet $SRV_HOST $SRV_PORT
command1
command2
#================
#Second Coding
#================
#!/bin/bash
SRV_HOST="myserver"
SRV_PORT="7777"
SRV_USER="SrvUser"
SRV_PASSWORD="SrvPassword"
telnet $SRV_HOST $SRV_PORT <<-EOF
command1
command2
EOF
|