www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/11/00:43:04

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
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Jonathan Simms" <Jonathan AT embassynetworks DOT com>
To: "'S.B.\(SangBum\) LEE'" <sangbum DOT lee AT oracle DOT com>, <cygwin AT cygwin DOT com>
Subject: RE: [Q]Windows PATH is not working..
Date: Fri, 11 Jan 2002 00:42:27 -0500
Message-ID: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAcu5Pm4AJRESGFKL/jVG418KAAAAQAAAAjbTaqbWjN0qRwRvoS305QwEAAAAA@embassynetworks.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2616
Importance: Normal
In-Reply-To: <3C3C048C.11CDC477@oracle.com>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700

Hi SB,

I'm kinda new to this too...here's what i think:


>>leesb AT leesb-kr ~
>>$ which notepad
>>/cygdrive/c/WINNT/system32/notepad

any time you access the filesystem *outside* of the cygwin install
folder (and *nix-esque file structure), cygwin uses the above format

C:\foo\bar.txt  =  /cygdrive/c/foo/bar.txt


>>leesb AT leesb-kr ~
>>$ cygpath -w /cygdrive/c/WINNT/system32/notepad
>>c:\WINNT\system32\notepad

>>leesb AT leesb-kr ~
>>$ c:\WINNT\system32\notepad
>>bash: c:WINNTsystem32notepad: command not found

>>leesb AT leesb-kr ~
>>$ c:\WINNT\system32\notepad.exe
>>bash: c:WINNTsystem32notepad.exe: command not found


bash interprets the '\' character as an escape character. If you have a
really long command for the shell, you can use the '\' to tell the shell
that when you press enter, you aren't trying to execute the command,
just get a little more room to type.

such as:

Jonathan AT embassy DOT com
$ rsync --archive --recursive --group --owner --permissions \ [*hit
enter*]

[you get a greater-than '>' on the left and keep typing]

>--exclude-file=exclusions /etc/foo /bkup/bar

and at the end, when you hit 'enter' it runs both lines as if they were
one really long line.


Cygwin also uses the '\' to handle spaces in filenames:

C:\My Documents\My Music\The Allman Brothers Band\Mountain Jam.mp3 ==>

/cygdrive/c/My\ Documents/My\ Music/The\ Allman\ Brothers\
Band/Mountain\ Jam.mp3


>>leesb AT leesb-kr ~
>>$ /cygdrive/c/WINNT/system32/notepad <-- in this case, it's working
fine.


this worked because you used the format that cywin understands :-)



>>What should I look at to fix this? Any ideas?

>>Please reply all because I'm not a subscriber. Thanks.



try "A Practical Guide to Linux" by Mark G. Sobell. It's an excellent,
thorough, and easily accesible reference. It's got a great section on
the bash shell, and gets really into scripting, etc.

Good Luck!
-Jonathan







--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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