This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Ask for help on running interactive cmd in Mintty!
- From: Tian You <youtian001 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 20 Jun 2012 15:16:15 +0800
- Subject: Ask for help on running interactive cmd in Mintty!
Hi All
I'm running a perl program like this:
## script start ##
print "Please input:";
my $input = <STDIN>;
chomp $input;
system("ssh to a remote machine to run an command");
print "done\n";
## script done ##
But after I input something and press enter, I can not see the output
of the ssh command.
Only after I press any key, the output flushes out to the screen.
Is the output buffered? But why it flushed after I press any one key?
What is stranger is, if I remove the read STDIN line, and just run the
system("ssh ..."), lI can see the output of ssh command at once.
The script is like this:
## script start ##
#print "Please input:";
#my $input = <STDIN>;
#chomp $input;
system("ssh to a remote machine to run an command");
print "done\n";
## script done ##
Anyone can help on this?
Regards,
Tian
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple