X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Date: Wed, 20 Jun 2012 15:16:15 +0800 Message-ID: Subject: Ask for help on running interactive cmd in Mintty! From: Tian You To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi All I'm running a perl program like this: ## script start ## print "Please input:"; my $input = ; 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 = ; #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