www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <E5F75587D181D3119D000090277E05C90170295F@pony.evansville.edu> |
From: | "Richardson, Anthony M." <ar63 AT evansville DOT edu> |
To: | "'Wilson Farrell'" <wfarrell AT bbn DOT com>, cygwin AT cygwin DOT com |
Subject: | RE: backslash and backslash backslash |
Date: | Fri, 2 Feb 2001 11:48:42 -0600 |
MIME-Version: | 1.0 |
X-Mailer: | Internet Mail Service (5.5.2650.21) |
I don't know why your script doesn't work. I think it is more a problem of setting the variable than later substitution. I assume you meant to pipe into read in your example. But even with a pipe your example doesn't work for me. I assume it's because read is a shell builtin and so the variable is set in a subshell. Anyway I use a script like this to automatically fire up associated windows apps. "start file.html" starts IE for example. It is similar to yours but uses command substitution to set the variable. #start - shell script winfile=$(cygpath -aws $1) #cd to c: to prevent problems if we are in a UNC path cd /cygdrive/c cmd /c start $winfile The shell doesn't seem to do backslash substition after variable substition. > From: Wilson Farrell [mailto:wfarrell AT bbn DOT com] > > In an attempt to access Netscape's sendto from cygwin I > created a simple > script: > > sendto.sh > ------- > #!/bin/bash > > /usr/bin/cygpath.exe -aw $1; read mypath > > /cygdrive/c/Apps/Netscape/Program/sendto32.exe $mypath > ------- > So, in theory "sendto.sh myfile.txt" should send myfile.txt > to Netscape > messenger as an attachment to a new mail. > > unfortunately since $mypath contains "\'s" instead of "\\'s" this > fails. sendto32.exe seems to require an absolute path name in dos > format, which is why I used cygpath. > > note, this works from the command line: > /cygdrive/c/Apps/Netscape/Program/sendto32.exe > c:\\wfarrell\\myfile.txt > > Is there an easy way to get around this problem. > > thanks, > wilson > -- -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |