LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem in the Unix Script (http://www.linuxquestions.org/questions/linux-networking-3/problem-in-the-unix-script-107435/)

triplek4ever 10-23-2003 01:01 AM

Problem in the Unix Script
 
Hi All,

Here is my requirement. I want to write out some commands in the particular port (Say, SMTP port). Using script I want to do this. Is there any way that I can do it using Unix script. Or I have to go for some other language like Perl. Thanks in Advance
EMail -> krishnakumar.kondalsamy@patni.com

hw-tph 10-23-2003 05:11 AM

Do you want to write to a remote port? telnet or netcat will help you do that. netcat is good for scripting, and it can also be set up to listen to a port for incoming connections if that's what you want.

Håkan

triplek4ever 10-27-2003 03:26 AM

Im working in Solaris 5.6. netcat is not available in this.

Ill explain you the scenario. My Java program is listening in a particular port. I want to write some commands/ just sentences in that port. In java its very easy, ill open the TCP or UDP connection and do this. Here I want it to do with the Unix Script. Can you please help me in this aspect. Thanks

david_ross 10-27-2003 01:25 PM

You could just use "telnet" and perhaps "expect" if you want interactivity.


All times are GMT -5. The time now is 04:43 AM.