This is the mail archive of the cygwin 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: bad PATH conversion under XP

On 1/25/2011 7:14 PM, Cyrille Lefevre wrote:


v2$ uname -a
CYGWIN_NT-5.1 PC213736 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin


Windows XP Professional Ver 5.1 Build 2600 Service Pack 3

though SSH at least :

v2$ regtool get /machine/SYSTEM/CurrentControlSet/Control/Session\
Files\ATI Technologies\ATI Control Panel;"C:\Program
Files\Samsung\Samsung PC Studio 3\

gives :

Files/ATI Technologies/ATI Control Panel:"C:/Program
Files/Samsung/Samsung PC Studio 3/:/bin

note the unconverted path between double-quotes :

"C:/Program Files/Hummingbird/Connectivity/7.00/Accessories/"

I saw this problem on msys, I think it applies to cygwin as well.

If you just go into environment under advanced system settings in control panel and remove the double quotes, it will work correctly. I'm on Windows 7.

also, how about to get rid of final slashes (.../ => ...) ?

You could reprocess your PATH in your .bashrc, but the final slashes should have no effect on how the PATH is actually used...

I cobbled together this awk script, I don't actually know awk :)

export PATH=$(awk 'BEGIN{RS="[:\n]"}{if(NR>1){printf(":")}sub(/\/$/,"",$0);printf("%s",$0)}' <<<$PATH)

this appear to work well under Windows Vista (i.e. : /cygdrive/c/Program Files/Hummingbird/Connectivity/7.00/Accessories)


Cyrille Lefevre

-- Problem reports: FAQ: Documentation: Unsubscribe info:

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