From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4564 invoked by alias); 25 Aug 2011 07:51:45 -0000 Received: (qmail 4549 invoked by uid 22791); 25 Aug 2011 07:51:43 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_RX,TW_YG X-Spam-Check-By: sourceware.org Received: from out3.smtp.messagingengine.com (HELO out3.smtp.messagingengine.com) (66.111.4.27) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Aug 2011 07:51:23 +0000 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.messagingengine.com (Postfix) with ESMTP id 35DD02069B; Thu, 25 Aug 2011 03:51:23 -0400 (EDT) Received: from web1.messagingengine.com ([10.202.2.211]) by compute3.internal (MEProxy); Thu, 25 Aug 2011 03:51:23 -0400 Received: by web1.messagingengine.com (Postfix, from userid 99) id 1409E3C18FD; Thu, 25 Aug 2011 03:51:23 -0400 (EDT) Message-Id: <1314258683.16270.140258133521969@webmail.messagingengine.com> From: "Ronald Fischer" To: "Eliot Moss" , cygwin@cygwin.com MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" References: <1314198447.17029.140258133233741@webmail.messagingengine.com> <1314201141.31858.140258133254297@webmail.messagingengine.com> <4E551F18.4020402@cs.umass.edu> Subject: Re: Does not work well: rlwrap + rxvt + cmd In-Reply-To: <4E551F18.4020402@cs.umass.edu> Date: Thu, 25 Aug 2011 07:51:00 -0000 X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-08/txt/msg00471.txt.bz2 On Wed, 24 Aug 2011 11:56 -0400, "Eliot Moss" wrote: > On 8/24/2011 11:52 AM, Ronald of Steiermark wrote: > > On Wed, 24 Aug 2011 08:39 -0700, "Andrew DeFaria" > > wrote: > > > For instance, to test the cruel BAT files which we are going to deliver. > > You can run .bat files from bash and other Cygwin shells. You can *run* them, but the effect is not always the same. For example, setting an environment variable within a batch file under CMD.EXE results in the environment variable being visible in the calling environment (similar to "sourcing" a file in bash), while calling the batch file from bash leaves the environment intact. Also, some internal commands (for example COPY) are not present in bash, though this can be easily remedied using an alias or a shell function. Other problems are related to the use of \ as a path separator. Imagine that some of your BATCH files generate environment variables containing a Windows path, and simply because bash command lines are interpreted differently than Windows CMD command line (for example, when it comes to quoting or parameter substitution). The main problem, however, is: If you are going to deliver something, which is supposed to run under CMD.EXE, most customers won't accept it until you really have tested it under CMD.EXE, and for good reason. In fact, even though I got running rxvt with cmd thanks to all the suggestions to my post, I will do some *final* tests still in plain, native Windoze Command-Windows, just for the safe side. Using a bash shell as a "main work horse" is great, but when you have the pleasure to create and test batch files, you will sooner or later be happy to also have a CMD shell available... > In both cases you generally to present Windows paths, of course; > cygpath can help with that. I use cygpath in several of my scripts and it's extremely useful, but dealing with the various path representations in interactive work is, for me at least, an annoyance... Thank you for your suggestions, though! Ronald -- Ronald Fischer + If a packet hits a pocket on a socket on a port, + and the bus is interrupted and the interrupt's not caught, + then the socket packet pocket has an error to report. + (cited after Peter van der Linden) -- 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