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:to:from:subject:date:message-id:references :reply-to:mime-version:content-type:content-transfer-encoding :in-reply-to; q=dns; s=default; b=Wv065S4qBmV8gweIGvv1wouY9TZJa8 VKL24Dm8dBBIdqxVsAmhe4SeZqWBPxNsyAt+OqHTTvgzIlWKaRtYz+FMvrQ026li HG/4t0yWt04D6f4BL5R8f2jcK7YCETh3U29gAqD9Ogxko8yELOQAOVr35uNN1enD k3Kpd6fn4coMg= 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:to:from:subject:date:message-id:references :reply-to:mime-version:content-type:content-transfer-encoding :in-reply-to; s=default; bh=+YtEm5hdBTe24mP68o827rLKFs4=; b=Tuum cXZDSTLcJSlWHDf1anLyZPWxtfzU+rjQhWEmAvk4LGucj5vbMphFndwHI3KsYf4G H+1/mE1UyRPHj+l32qaCcIGdAbiGsTe+D9wXOFCKMlIpaBM/ryVxhrnHkZOPgThH VYpXpdjvw699NZrVOcBQhdXlt+spR/OnTN6Z1bY= 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-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=ren, H*f:sk:5700294, H*MI:sk:5700294, H*i:sk:5700294 X-HELO: plane.gmane.org To: cygwin AT cygwin DOT com From: =?UTF-8?Q?Ren=c3=a9_Berber?= Subject: Re: pass arguments enclosed with double quotes from bash shell to windows program Date: Sat, 2 Apr 2016 17:27:44 -0600 Lines: 32 Message-ID: References: <5700294B DOT 6020308 AT cs DOT umass DOT edu> Reply-To: Do not reply Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0 In-Reply-To: <5700294B.6020308@cs.umass.edu> X-IsSubscribed: yes On 4/2/2016 2:19 PM, Eliot Moss wrote: > Have you tried: '"arg"' ? bash should strip the ' ' and leave the " ". > Also, what about "\"foo\"" ? > > My experiments with this suggest that they work. I tried invoked a .bat > file that echoes its first argument, and it did show "\"foo\"", but I > suspect that is how echo renders "foo", i.e., it wraps it in quotes and > backslash protects the quotes. > > Here's a function I use for invoking acrobat from the bash command line: > > function acrobat () { > local ARG > [ -n "$1" ] && { ARG="$(cygpath -wa "$1")"; shift; } > command acrobat ${ARG:+"${ARG}"} "$@" > /dev/null & > } > > For it to work, acrobat needs to be on your path (I put a link in a > directory > that is on my path). Anyway, works fine for me to pop up acrobat > displaying > a file. I've not tired an incantation for printing ... And there's always cygstart, no need to do anything special with the arguments, if the file has the .pdf extension, it will be opened by the default application, which usually is Acrobat. Regards. -- René Berber -- 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