This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1.3.9: Bash and Telnet / Redirection / Here documents and Redirecting input problem


Hello,

I've got a problem with redirection in Cygwin.

Here is a script that doesn't work under bash or ash :

#### Begin
telnet mail 25 << EOT
MAIL FROM: <an_email>
RCPT TO: <my_email>
DATA
Subject: Test sending mail with telnet

Just a test
Olivier

.
quit
EOT
#### End

It's ok when I write this directly on a shell session (i.e without "<<
EOT").
The script is ok on several Unix (Solaris, HP-UX, Linux) with several Shell.
I tried "telnet mail 25 < file_with_smtp_commands" but it doesn't work.
(idem with "cat file_with_smtp_commands | telnet mail 25")

Redirection is ok with "bc". For example, this script is working fine :

#### Begin
bc << EOT
20*4
EOT
#### End

I tried such redirection with "PLUS80.EXE" (Oracle SQL*Plus for windows) :
no success.

So here are my questions :
- can we use redirection with Windows executables?
- is it an Unix emulation problem, a shell problem, or a telnet problem?
- does a workaround exist?

Regards.
Olivier RONGIER.
(french user)
mailto:orongier@netcourrier.com


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]