X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=W3JYG6uqlGTB+q7Y IAieP5Q0KQenjPWPKvucpkZKEIEw6whCg0AI/dX7I0gIWeUmVW5TxYCpd3f3nG1w Xpp0Ec4kFO/DzcR9Tnb4NIT6FNNQbFbFj1wBpv9DuStltvZQW3M5v3JrnKn5w6Z1 01D4sVG7xlnGzmz0uia258UuD1s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=owXRqMS3Rn5RHcgxzu8SOP 6/NFQ=; b=XlTWoesXsQHorQHcTCKWPWP4XVP9OVe8PANRDrzr2p0qx85ki1Phq6 4k9VdgyRp24FABCr7DZqua2qq5sWPHCT5t3L9heTkpf7GY6Bi3TEjx0+gXPq0rKi d+ZVGnMN6LcbrYOch31s6BnDThWtN9cSny4l4EaCGuc0DToP6Xagk= 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 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 Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: Command line processing in dcrt0.cc does not match Microsoft parsing rules To: cygwin AT cygwin DOT com References: From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <4b009461-54a1-bbfa-78ea-c0ccf0faa7f2@SystematicSw.ab.ca> Date: Sat, 7 Sep 2019 15:33:58 -0600 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 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