delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/05/16:46:23

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
From: "Hannu E K Nevalainen \(garbage mail\)" <garbage_collector AT telia DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: "bash -c" inquery
Date: Mon, 5 May 2003 22:44:43 +0200
Message-ID: <NGBBLLIAMFLGJEOAJCCEKEFBCPAA.garbage_collector@telia.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
In-Reply-To: <3EB69C4C.2070004@cotagesoft.com>
X-Mimeole: Produced By Microsoft MimeOLE V5.50.4925.2800
Importance: Normal
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id h45KkNA32066


> -----Original Message-----
> From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf
> Of Shankar Unni
> Sent: Monday, May 05, 2003 7:16 PM
> To: cygwin AT cygwin DOT com
> Subject: Re: "bash -c" inquery
> 
> 
> Elfyn McBratney wrote:
> 
> >>why this command did not work correctly ??
> >>c:\cygwin\bin\bash --login -i -c "net use \\\\view\\MCDT1_ST72521"
> 
> > Should be '\\server\resource' when called from within Windows.
> 
> Actually, in this case, he needs to go the other way: one set of 
> back-slashes is eaten when the bash -c command is parsed above, and 
> another set of backslashes is eaten when bash actually executes the 
> command, so try:
> 
>    bash --login -i -c "net use \\\\\\\\view\\\\MCDT1_ST72521"
> 
> (Seriously!)
> --
> Shankar.

Seriously, using *single quotes* should make it work. ;-) 
Looks a lot nicer too ;-)
Single quotes means "do not touch, not even a bit" to bash (more shells?).

In other words, things like this works:
$ cd 'C:\WINDOWS' ; pwd
/cygdrive/c/WINDOWS
May I call it "the CygWin special"? ;-)
 [i.e. Windows paths in Unix emulation ;-]

/Hannu E K Nevalainen, Mariefred, Sweden
 

- Raw text -


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