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: [Q]Windows PATH is not working..


Hi SB,

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


>>leesb@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@leesb-kr ~
>>$ cygpath -w /cygdrive/c/WINNT/system32/notepad
>>c:\WINNT\system32\notepad

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

>>leesb@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@embassy.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@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/


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