Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: "Richardson, Anthony M." To: "'Wilson Farrell'" , 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) Content-Type: text/plain; charset="iso-8859-1" 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