delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/02/14:43:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Soren A <somian AT adelphia DOT net>
Subject: Re: example needed pls: `cygpath -c <HANDLE>'
Date: Wed, 2 Jul 2003 18:39:07 +0000 (UTC)
Organization: Occasionally Sporadically
Lines: 51
Message-ID: <Xns93AC9522FA6D6soren1Gmane@80.91.224.249>
References: <3EFE120B DOT 58A0C79E AT dessent DOT net> <Pine DOT GSO DOT 4 DOT 44 DOT 0306282234360 DOT 22307-100000 AT slinky DOT cs DOT nyu DOT edu> <20030701040434 DOT GE7604 AT ny-kenton2a-710 DOT buf DOT adelphia DOT net> <3F018740 DOT B28F53DC AT dessent DOT net> <3F018D6C DOT EA1226CA AT dessent DOT net> <Xns93ABB16F2D760soren1Gmane AT 80 DOT 91 DOT 224 DOT 249> <3F021C46 DOT C8F4CE31 AT dessent DOT net> <Xns93AC469331861soren1Gmane AT 80 DOT 91 DOT 224 DOT 249> <Xns93AC47EC6AA77soren1Gmane AT 80 DOT 91 DOT 224 DOT 249> <3F02DA32 DOT EAD1FC18 AT dessent DOT net>
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Xnews/L5
X-Archive: encrypt

Brian Dessent <brian AT dessent DOT net> wrote around 02 Jul 2003
news:3F02DA32 DOT EAD1FC18 AT dessent DOT net: 

> "%CYGROOT%\\bin\\bash -c \"echo -n `/bin/cygpath -u
> '%l'`>/dev/clipboard\"" + NewLine
> 
> When I run the command I get an error.  The proper quoting is
> 
> "%CYGROOT%\bin\bash" -c "echo -n `/bin/cygpath -u '%l'`>/dev/clipboard" 
> 
> You don't want to escape the double-quotes because they are there to
> tell the windows shell to make all that stuff a single arg, after -c. 
> You need double quotes around the exe image in the off chance there's
> a space in $CYGROOT.

This is fun and bizarre because on win98SE this seems to work for me; the 
whole thing "just works". Windows is SO inconsistent.

One thing that complicates comparison of my setup with others is that my 
Windows "shell" (the kind shipped by M$) is set to "CMD.exe" from a Win2K 
SDK that "mostly" runs on Win9x, instead of the "normal" COMMAND.COM. It is 
entirely possible I think that the first pass at processing the command is 
being done by whatever %COMSPEC% points to and that the two would have (do 
have) different quoting rules should come as a surprise to no-one.

> And there's the issue of the raw binary newline at the end.

That was a goof, I was too close to bedtime to try to send in a fix for 
that before turning in.

> The hexified version of that is
> hex(2):22,25,43,59,47,52,4f,4f,54,25,5c,62,69,6e,5c,62,61,73,68,22,20,2
> d,63,20,22,65,63,68,6f,20,2d,6e,20,60,2f,62,69,6e,2f,63,79,67,70,61,74,
> 68,20,2d,75,20,27,25,6c,27,60,3e,2f,64,65,76,2f,63,6c,69,70,62,6f,61,72
> ,64,22,00 
> 
> 
> ----
> 
> Anyway, the Right Way (IMHO) to do this would be something like the
> following

Escalated to C! Yeah! OK, NOW we're rockin'. ;-)

More later.

-- 
"So, tell me, my little one-eyed one, on what poor, pitiful,
defenseless planet has my MONSTROSITY been unleashed?"
                       - Dr. Jumba, Disney's "Lilo & Stitch"
OpenPGP Key at http://savannah.gnu.org/people/viewgpg.php?user_id=6050


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019