This is the mail archive of the
mailing list for the Cygwin project.
Re: example needed pls: `cygpath -c <HANDLE>'
Brian Dessent <firstname.lastname@example.org> wrote around 02 Jul 2003
> "%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
> Anyway, the Right Way (IMHO) to do this would be something like the
Escalated to C! Yeah! OK, NOW we're rockin'. ;-)
"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