UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old June 20th, 2003, 09:52 PM
timzter timzter is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 63 timzter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 2 m 39 sec
Reputation Power: 6
Can't run script in cygwin shell window

I have the following Bourne shell script (that's why I don't need to have #!/bin/sh at the top):

telnet macbeth 9999 << EOF
keepalive
initializeaccount
maketransact 9102123 12 41
release
EOF

This file is created on an IRIX machine and the 'macbeth' machine is an HPUX machine. This script works with no problems, sending the commands to macbeth:9999 and echoing the expected results back to stdout.

However, when the same script is executed in a cygwin shell (doesn't matter if it's bash or tcsh) running on Win2K, it doesn't work. All I see is the regular telnet greeting, and then it exits. Note that the connection WAS made. I checked the logs on macbeth:9999 and I saw that the commands in the script didn't even make it to the server.

Does anyone know why it doesn't work in the cygwin shell, and how to solve it? I am thinking it might have to do with the fact that on Unix, newlines are 0xA and in Windows/DOS, it's 0xD 0xA (carriage return/line feed sequence). I even tried ftp-ing down the IRIX version of the script to the PC in 'binary' mode to preserve the 0xA and then running the script on the PC in the cygwin window. It doesn't help.

Anyone has any idea how to make it work in the cygwin window on the PC?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Can't run script in cygwin shell window


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway