This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: pass arguments enclosed with double quotes from bash shell to windows program
- From: Michael Enright <mike at kmcardiff dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 2 Apr 2016 12:34:10 -0700
- Subject: Re: pass arguments enclosed with double quotes from bash shell to windows program
- Authentication-results: sourceware.org; auth=none
- References: <CAEF1h+WELCS56_5Up2UBKbQxAhj37Rs50p3gojSceLSfOHyu3w at mail dot gmail dot com>
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