title: telnet on a port and fire command from shell script
body: <p>My requirement is a script to telnet on a port and fire command.<br>
  I can manually do this from bash mode.<br>
  First of all i fire command "telnet 0 3300"<br>
  Then i get the prompt saying "Enter Command:"<br>
  So then i enter "LOGIN:sogadm:sogadm;"<br>
  So now i have logged in to that port.<br>
  After this i again get the prompt "Enter Command:".<br>
  SO now i can fire my specific commands.  </p>
  
  <p>Below i have shown the logs, how it goes on:  </p>
  
  <hr>
  
  <p>bash-3.00# telnet 0 3300<br>
  Trying 0.0.0.0...<br>
  Connected to 0.<br>
  Escape character is '^]'.<br>
  CONNECTING TO CAI...  </p>
  
  <p>PROCESS cai3300 CONNECTED...  </p>
  
  <p>Enter command: LOGIN:sogadm:sogadm;<br>
  RESP:0;<br>
  Enter command:   SET:AIRSUB:MSISDN,551100116:ACTIONTYPE,REFILL:REFILLPROFILEID,1:TRANSACTIONAMOUNT,500000:TRANSACTIONCURRENCY,DZD;<br>
  RESP:17200;<br>
  Enter command:   </p>
  
  <hr>
  
  <p>SO i want my script to do all this.<br>
  Please help.<br>
  Thanks in advance  </p>