X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: Yes, hits=5.5 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,FSL_FREEMAIL_1,FSL_FREEMAIL_2,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org References: <1344017509 DOT 70947 DOT YahooMailNeo AT web161502 DOT mail DOT bf1 DOT yahoo DOT com> <1344020282 DOT 97348 DOT YahooMailNeo AT web161504 DOT mail DOT bf1 DOT yahoo DOT com>,<1344021535 DOT 36623 DOT YahooMailNeo AT web161501 DOT mail DOT bf1 DOT yahoo DOT com> <0105D5C1E0353146B1B222348B0411A20A954E0E13 AT NIHMLBX02 DOT nih DOT gov> <1344217063 DOT 51063 DOT YahooMailNeo AT web161502 DOT mail DOT bf1 DOT yahoo DOT com> <1344217202 DOT 72516 DOT YahooMailNeo AT web161503 DOT mail DOT bf1 DOT yahoo DOT com> Message-ID: <1344218308.85755.YahooMailNeo@web161505.mail.bf1.yahoo.com> Date: Sun, 5 Aug 2012 18:58:28 -0700 (PDT) From: John Wiersba Reply-To: John Wiersba Subject: Re: Cygstart bug: doesn't keep command line arguments intact To: "cygwin AT cygwin DOT com" In-Reply-To: <1344217202.72516.YahooMailNeo@web161503.mail.bf1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q761wrMR014127 Thanks for your reply, Barry.  Yes, it seems that way to me, too.  But that seems wrong.  I would think that cygstart should pass arg1 as arg1 to the specified command (winword.exe in my example).  That's certainly the way it works in the unix/linux world and cygstart should be considered as an (emulated) unix command, right?  If cygstart were a Windows command I would expect such behavior, but from an (emulated) unix/linux command, I expect the arguments to be kept intact.  In any case, it makes it awkward to run the command I mentioned, because I have to parse the arguments myself and perform awkward substitutions on them. -- John P.S. I don't know why, but my reply kept getting rejected as spam by cygwin.org's filters, even though I was using yahoo's "plain text" mode:   Remote host said: 552 spam score exceeded threshold (#5.6.1) [BODY] >> From: "Buchbinder, Barry (NIH/NIAID) [E]" >> >>John Wiersba wrote August 03, 2012 3:18 PM >>>Calling              /c/program\ files/microsoft\ office/office12/winword.exe "a b c.doc" works. >>>Calling cygstart /c/program\ files/microsoft\ office/office12/winword.exe "a b c.doc" tries to open a.doc, b.doc, and c.doc. >> >>In the first, bash strips the quotes and passes to winword as arg1. >> >>In the second, bash strips the quotes and passes to cygstart as arg1. >>cygstart then passes , , and to winword as arg1, arg2, and arg3. >> >>At least that is the way I understand it. >>Subject to correction by the more knowledgeable. >> >>So try protecting your double quotes with single quotes.  E.g. '"a b c.doc"'. >>I don't know if the double quotes get passed to winword, but there is a lesser >>chance that single quotes will work if they are on the inside, I doubt MS ever >>treats >them as special. -- 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