delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:to:from:subject:date:message-id:references | |
:reply-to; q=dns; s=default; b=bXRwVDG/sc0V0+0//EgVY4bLpGrRG+0qq | |
fJ8b6huCkAjUpntiozToWaqhp6Ik3f2HE8uKmi4IW04d/jSkLjtAeHrI0j8SM3Z5 | |
zRoz9YOJ2IFfx8gor3p7vvcDINxIS3fNsBA0rVrkBzgb5/N9ok/zzPnHd5K3M+P1 | |
a48N96xbu4= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:to:from:subject:date:message-id:references | |
:reply-to; s=default; bh=0cNIdmjP0drwVgHjSkgMF2x0Qzc=; b=lEEr/y6 | |
6nta774IcATZ/MG/SOuldg4WIMEwRBtFMZ1Oqq1ihtCjnWKBbrKSXwh5wTKBsLh+ | |
2xepB/Z0CnFrSw00SEpT18LO9/iynDsNjS2Qwk6lEGEiTWv0v1p8z63OekXNZS5Q | |
UAvZVcR1M5m0OX1QIjiwei+ILjTapvr+nfMo= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=1.8 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=bluetooth, Bluetooth, william, considerably |
X-HELO: | blaine.gmane.org |
To: | cygwin AT cygwin DOT com |
From: | Will Parsons <wbp AT nodomain DOT invalid> |
Subject: | tcsh path conversion messed up? [was: strange shell output using tcsh under Cygwin] |
Date: | Mon, 6 Nov 2017 21:48:35 +0000 (UTC) |
Lines: | 124 |
Message-ID: | <otqlbj$91n$1@blaine.gmane.org> |
References: | <oto9is$k56$1 AT blaine DOT gmane DOT org> |
Reply-To: | wbparsons AT cshore DOT com |
User-Agent: | slrn/1.0.3 (CYGWIN_NT-6.1) |
X-IsSubscribed: | yes |
I asked about what I thought was a shell scripting problem: Will Parsons wrote: > Under Unix-type platforms, checking on what the PATH variable is set to is > pretty easy - I typically use "env" and the displayed value of PATH is easily > parsed by eye. Under Cygwin/Windows, one can do the same, but the value of > PATH is more likely to be considerably more complicated and harder for a > human to parse. For example, this is what I see on my local machine under > Cygwin: > > PATH=/usr/local/bin:/usr/bin:/c/Windows/system32:/c/Windows:/c/Windows/system32/wbem:/c/ProgramData/Oracle/Java/javapath:/c/Program Files/Common Files/Microsoft Shared/Windows Live:/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/c/Program Files/Dell/DW WLAN Card:/c/Program Files (x86)/Intel/iCLS Client:/c/Program Files/Intel/iCLS Client:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files/WIDCOMM/Bluetooth Software:/c/Program Files/WIDCOMM/Bluetooth Software/syswow64:/c/Program Files (x86)/Windows Live/Shared:/c/Program Files (x86)/Bazaar:/c/Program Files (x86)/QuickTime/QTSystem:/c/cygwin/home/william/bin:/c/ezwinports/bin:/c/Program Files (x86)/PuTTY:/usr/lib/lapack:/usr/sbin:/c/msys/1.0/local/bin This was a cut/paste, so I would be sure of not making a mistake. The PATH looks completely reasonable to me, but... > I thought it would be nice to write a simple script to make this more > comprehensible by breaking the path into separate lines, and so wrote the > following trivial script: > > #!/bin/sh > echo $PATH | tr ':' '\n' > > Oddly though, it does not give the expected results under Cygwin. Running > this script under Cygwin under my normal interactive script (tcsh) yields the > following: > > % ./path > /usr/local/bin > /usr/bin > /bin > /usr/sbin > /c/Windows/system32 > /c/Windows > /c/Windows/system32/wbem > /c/ProgramData/Oracle/Java/javapath > /c/Program > Files/Common > Files/Microsoft > Shared/Windows > Live > /c/Program > Files > (x86)/Common > Files/Microsoft > Shared/Windows > Live > /c/Program > Files/Dell/DW > WLAN > Card > /c/Program > Files > (x86)/Intel/iCLS > Client > /c/Program > Files/Intel/iCLS > Client > /c/Windows/System32/WindowsPowerShell/v1.0 > /c/Program > Files/WIDCOMM/Bluetooth > Software > /c/Program > Files/WIDCOMM/Bluetooth > Software/syswow64 > /c/Program > Files > (x86)/Windows > Live/Shared > /c/Program > Files > (x86)/Bazaar > /c/Program > Files > (x86)/QuickTime/QTSystem > /c/cygwin/home/william/bin > /c/ezwinports/bin > /c/Program > Files > (x86)/PuTTY > /usr/lib/lapack > > Clearly the path is being broken using spaces as well as colons. > > Even thoush the shell script itself explicitly specifies "/bin/sh", the > result seems to depend on the shell being used to invoke it. Using Cugwin > bash, the same script results in the following: > > sothis$ ./path > /usr/local/bin > /usr/bin > /c/Windows/system32 > /c/Windows > /c/Windows/system32/wbem > /c/ProgramData/Oracle/Java/javapath > /c/Program Files/Common Files/Microsoft Shared/Windows Live > /c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live > /c/Program Files/Dell/DW WLAN Card > /c/Program Files (x86)/Intel/iCLS Client > /c/Program Files/Intel/iCLS Client > /c/Windows/System32/WindowsPowerShell/v1.0 > /c/Program Files/WIDCOMM/Bluetooth Software > /c/Program Files/WIDCOMM/Bluetooth Software/syswow64 > /c/Program Files (x86)/Windows Live/Shared > /c/Program Files (x86)/Bazaar > /c/Program Files (x86)/QuickTime/QTSystem > /c/cygwin/home/william/bin > /c/ezwinports/bin > /c/Program Files (x86)/PuTTY > /usr/lib/lapack > /usr/sbin > /c/msys/1.0/local/bin I have just rebooted my Windows machine and see that in constrast to what I wrote above, the value of PATH under tcsh shows up as: PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/c/Windows/system32:/c/Windows:/c/Windows/system32/wbem:/c/ProgramData/Oracle/Java/javapath:/c/Program:Files/Common:Files/Microsoft:Shared/Windows:Live:/c/Program:Files:(x86)/Common:Files/Microsoft:Shared/Windows:Live:/c/Program:Files/Dell/DW:WLAN:Card:/c/Program:Files:(x86)/Intel/iCLS:Client:/c/Program:Files/Intel/iCLS:Client:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program:Files/WIDCOMM/Bluetooth:Software:/c/Program:Files/WIDCOMM/Bluetooth:Software/syswow64:/c/Program:Files:(x86)/Windows:Live/Shared:/c/Program:Files:(x86)/Bazaar:/c/Program:Files:(x86)/QuickTime/QTSystem:/c/cygwin/home/william/bin:/c/ezwinports/bin:/c/Program:Files:(x86)/PuTTY:/usr/lib/lapack This doesn't look right, and would explain the strange shell output I reported. (The value of PATH under bash looks normal.) Did the installation of tcsh somehow get corrupted? I don't remember a particularly recent update to tcsh. -- Will -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |