Hi All,
I was trying to use telnet in a script to access a certain processor on a certain port to view some processes. The problem is that when I use telnet the output is displayed for me.
The script is:
#!/bin/sh
cd /ahmed/ezzat/
rm ss7trace.log
touch ss7trace.log
chmod 755 ss7trace.log
telnet 172.16.0.9 8100
ps > result
quit
At the line of telnet I get an output:
Trying 172.16.0.9...
Connected to 172.16.0.9.
Escape character is '^]'.
U-Qtil>
but thats not what I want. I want the script to telnet to the processor then do ps and write the result in the result file then quits without giving me the output of telnet to type ps.
Can anyone help me regarding this, I will be so thankful.
Best Regards,
Ahmed.