Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Tue, 11 May 2004 10:33:30 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: rsh, strange command line parsing Message-ID: <20040511083330.GB12030@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20040511 DOT 132145 DOT 27806189 DOT gotoh AT taiyo DOT co DOT jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040511.132145.27806189.gotoh@taiyo.co.jp> User-Agent: Mutt/1.4.2i On May 11 13:21, Shun-ichi GOTO wrote: > Hi, developers > > Few days ago, I upgraded cygwin from 1.5.5 to 1.5.9 > and I found strange behavior of rsh. > > The problem is that rsh want to handle argument of executing command. > For example, > > $ rsh host ls -a > rsh: unknown option -- a > Try `rsh --help' for more information. > $ rsh host "ls -a" > ... > $ > > I tried testing with two version of rsh contained in interutils 1.3.25 > and 1.3.28. 1.3.25 doesn't have this problem, but 1.3.28 has. rsh is using getopt_long for option processing. The old versions had it statically linked in while newer versions are using the getopt_long built into Cygwin. By default, Cygwin's getopt_long has argument permutation switched oon, so that explains it. For now, add the environment variable POSIXLY_CORRECT before calling rsh or, even simpler, quote the remote command: rsh server 'ls -a' The next version of inetutils will have argument permutation switched off for short option processing. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Co-Project Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/