X-Recipient: archive-cygwin@delorie.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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=TK
	LABr7q2IlTdz+AZd8u1U6+cMZiSsirHHJUIG9HUJMcJZWgoU7majCW9azv9o/ln3
	BlrsLcpEzwN1KlPpd4xJoI9cCtHqJqQy7bNqOtvP5TUdcAAVoUW5P35fibMIzrYt
	3QQB29igH24aNmf3PvZ6jbfDBRA+RuS0SWe9AcNj4=
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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=kTIBwa9g
	RpzbskgvnNhQJb4CnjY=; b=Jw2H0XaA5q0rMGGZS9dRxVyDN7i2p3BFVcvEYUQR
	O2GbW4s89iOcgbo5Fk+MkFrLHzytdDo6QdsT64BQoGmqb6oviaHK32AFXGSWQYYI
	yYAdEkPyuHgIAK1lAwcpItGHh1MVYpEjWbHu812G/7864p2oo055V4MDAkd0AC8W
	ALM=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=fight, Hx-languages-length:1311, lewis, Lewis
X-HELO: mail-ob0-f173.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:mime-version:in-reply-to:references:date         :message-id:subject:from:to;        bh=cXdNlHHURnNVDeuzVwFZ+wqRDAT382g1gYgnU/8l390=;        b=BS63c0UVGL/O1QSvMDP3n3qk8DuEzqPxtVihQx4/cUDKZ3qPK3y11+aEcUcusybGYA         GRom9rmVAKhB/gGgd4YZ5P1W12Ky6//0eO3mwji3uo+sIrWtQ3+C8YtQVi6IIm42EFK2         kV6mya9e0xTCpQOS1CGsnQK/Fa9EHteCJCEfsgX5HRqAZMAl8pLD6kXCY+w15+sHBN1F         nr6qbHnmVeA8QLv7DSZ4hmGckMD9OT5O3Rikqoa5KG+iqo+MPpWs/kjTZGdzQalAjtKZ         1QfrgFSp1snPoxzBU4f3A5XIYLZ8QAyJBLMiC7pjoqU1rLpq8v3NG4U0qlwJ4vxq+07i         o4sA==
X-Gm-Message-State: AD7BkJJhQw9fY058AgKkVsLRoJgYFl5+0mFQ9YpeGJiXiCLwI+LSITWgzy25omUyVWhlDCHzv1atCeLSVmUHVQ==
MIME-Version: 1.0
X-Received: by 10.60.59.226 with SMTP id c2mr6989756oer.40.1459625650889; Sat, 02 Apr 2016 12:34:10 -0700 (PDT)
In-Reply-To: <CAEF1h+WELCS56_5Up2UBKbQxAhj37Rs50p3gojSceLSfOHyu3w@mail.gmail.com>
References: <CAEF1h+WELCS56_5Up2UBKbQxAhj37Rs50p3gojSceLSfOHyu3w@mail.gmail.com>
Date: Sat, 2 Apr 2016 12:34:10 -0700
Message-ID: <CAOC2fq_VRWLgHhPpK6PkAUXrtmxiDZx5tkwugD6jF9YgG5VKaw@mail.gmail.com>
Subject: Re: pass arguments enclosed with double quotes from bash shell to windows program
From: Michael Enright <mike@kmcardiff.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes

On Sat, Apr 2, 2016 at 11:59 AM, Cary Lewis wrote:
> I need to start acrobat from a bash shell.
>
> Acrobat needs some of its parameters to be enclosed with double
> quotes. This is needed to automatically open and print a pdf.
>
>
> If I try to do a \", then it passes the \" to the windows app.

I frequently use WinMerge, a graphical text file comparision program,
from the bash shell. Occasionally this involves a file in the current
directory vs a file at the end of a path full of spaces and slashes.
If this question had come up yesterday I could have looked at my
history for examples. My recollection is that the rules for expanding
arguments enclosed in single quotes are helpful. Single-quoted
arguments are processed much less by bash than even double-quoted
arguments. A simple example is if you need to put a backslash in an
environment variable, you don't have as many layers to fight if you
use single quotes export regex='search\$'. I also use $(cygpath) in
some fashion to convert the path since WinMerge is not a Cygwin
program. I get the full path to one of the files using tab completion,
and then I modify the path by surrounding it with the necessary
cygpath syntax to convert the path to a Windows path.

--
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

