From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11404 invoked by alias); 7 Sep 2019 21:34:04 -0000 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 Received: (qmail 11394 invoked by uid 89); 7 Sep 2019 21:34:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=dcrt0cc, UD:dcrt0.cc, dcrt0.cc, Provine X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 07 Sep 2019 21:34:02 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id 6iLGiU8PysAGk6iLHiKKwK; Sat, 07 Sep 2019 15:33:59 -0600 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: Command line processing in dcrt0.cc does not match Microsoft parsing rules To: cygwin@cygwin.com References: From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <4b009461-54a1-bbfa-78ea-c0ccf0faa7f2@SystematicSw.ab.ca> Date: Sat, 07 Sep 2019 21:50:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00084.txt.bz2 On 2019-09-05 16:01, Stephen Provine via cygwin wrote: > On 9/5/19 2:05 PM, Eric Blake wrote: >> On 9/5/19 1:31 PM, Stephen Provine via cygwin wrote: >>> Not expected. > >> Why not? That obeyed cmd's odd rules: The moment you have a " in the >> command line, that argument continues until end of line or the next " >> (regardless of how many \ precede the "). > > Now I'm really confused. Brian seemed to indicate that the POSIX rules were > followed, but you're indicating that the Windows command line parsing rules > are followed. So I assume the reality is that it is actually some mix of the two. > Is the effective parsing logic implemented by Cygwin documented anywhere? Depends on what you are running thru - you have layers - in that test case you ran from cmd, so cmd parsing has to be first taken into account, before passing the resulting command line to bash, where Cygwin will construct a POSIX argument list from cmd output, and pass that to bash then script.sh. Try your testing using my script.sh shown earlier, and call bash with -vx options for debugging output. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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