OT: Linux help telnet + heredoc

  • From: "Aragon, Gabriel (GE, Corporate, consultant)" <gabriel.aragon@xxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 1 Mar 2012 22:52:04 -0500

first of all my apologies if you consider this highly offtopic, I have already 
posted this in a couple of linux forums w/o luck, so I wanted to try here since 
I know that some dba’s are also very good sysadmins.

I need some help with a Linux issue, I’m sending an email on Solaris 10 using 
telnet to port 25 inside a heredoc:

telnet localhost 25 <<XXX
MAIL FROM: xxx@xxxxxxxxxx
RCPT TO: yyy@xxxxxxxxxx
SUBJECT: mysubject

Nothing here 


However when doing same in Linux RHEL5 it does not work, I mean, nothing is 
sent, no error returned, but doing this line by line w/o heredoc on Linux, it 
works. I have another commands with heredoc like sqlplus and they work fine, so 
issue seems to be with telnet + heredoc, maybe there is something I’m doing 
wrong, any help would be appreciated.

Gabriel Aragon

Other related posts: