LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-23-2003, 02:01 AM   #1
triplek4ever
LQ Newbie
 
Registered: May 2003
Posts: 2

Rep: Reputation: 0
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
 
Old 10-23-2003, 06:11 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
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
 
Old 10-27-2003, 04:26 AM   #3
triplek4ever
LQ Newbie
 
Registered: May 2003
Posts: 2

Original Poster
Rep: Reputation: 0
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
 
Old 10-27-2003, 02:25 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You could just use "telnet" and perhaps "expect" if you want interactivity.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unix shell script cxy0481 Programming 9 11-20-2005 09:15 AM
telnet windows m/c from unix shell script ann124 Programming 1 11-10-2004 02:26 PM
passing java parameters to a unix script nephilim Programming 25 10-22-2003 11:51 AM
scripting the unix command script lmcthbe Linux - General 7 05-28-2003 03:49 PM
How to schedule unix script periodically from unix os level??? gopi_20us Programming 2 03-11-2002 07:45 AM


All times are GMT -5. The time now is 12:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration