LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-16-2005, 07:40 PM   #1
ajaye1971
LQ Newbie
 
Registered: Sep 2005
Location: San Diego
Posts: 12

Rep: Reputation: 0
Bash scripting question


I am new to scripting. I was wondering if BASH is powerful enough to use it to open a telnet session on port 25 to a mail server, and echo data when prompted to send a simple email message. Is that beyond the power of BASH??

Thanks for any answers.

-AJ
 
Old 11-16-2005, 08:29 PM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
try:
Code:
telnet <IP> <port> << EOF
.......
.............
................
...................
....................
EOF
All the lines before EOF will be sent to telnet

Last edited by perfect_circle; 11-16-2005 at 08:31 PM.
 
  


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
Bash Scripting Question fiod Linux - Newbie 4 11-19-2005 06:09 AM
bash scripting question bmfan Linux - Software 6 11-04-2005 09:54 PM
Bash scripting question. pete1234 Programming 23 09-22-2005 07:52 PM
Bash Scripting Question jsimmonds Programming 2 06-16-2005 10:07 AM
Bash scripting question Hammett Linux - General 4 11-29-2004 07:29 AM


All times are GMT -5. The time now is 02:31 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration