X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_50,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org X-IronPortListener: Outbound_SMTP X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EAF+9HlCcKEcW/2dsb2JhbABFuT2BB4IhAQEEEihPAgEIDScCEB8TJQEBBAEaGodrnmqbVotKhiRgA40WjjCKD4J7 From: "Buchbinder, Barry (NIH/NIAID) [E]" To: "cygwin AT cygwin DOT com" , John Wiersba Date: Sun, 5 Aug 2012 14:38:56 -0400 Subject: RE: Cygstart bug: doesn't keep command line arguments intact Message-ID: <0105D5C1E0353146B1B222348B0411A20A954E0E13@NIHMLBX02.nih.gov> 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> In-Reply-To: <1344021535.36623.YahooMailNeo@web161501.mail.bf1.yahoo.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-IsSubscribed: yes 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q75IdFEu025216 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. Good luck. - Barry Disclaimer: Statements made herein are not made on behalf of NIAID. -- 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