This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: "bash -c" inquery



> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
> Of Shankar Unni
> Sent: Monday, May 05, 2003 7:16 PM
> To: cygwin@cygwin.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
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]