www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.6 required=5.0 tests=BAYES_00 |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4B147423.1050404@bopp.net> |
Date: | Mon, 30 Nov 2009 19:40:51 -0600 |
From: | Jeremy Bopp <jeremy AT bopp DOT net> |
User-Agent: | Thunderbird 2.0.0.23 (X11/20090817) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: how to get the windows PATH env in cygwin |
References: | <8d7f7110911300444l7ab3c2c8l5ac1edf0097d2065 AT mail DOT gmail DOT com> <4B142061 DOT 6000200 AT cygwin DOT com> <8d7f7110911301717jbafbc2ci432817b1c713f1e6 AT mail DOT gmail DOT com> <20091201013022 DOT GA2336 AT KCJs-Computer> |
In-Reply-To: | <20091201013022.GA2336@KCJs-Computer> |
X-IsSubscribed: | yes |
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 |
Gary Johnson wrote: > On 2009-12-01, ??????????????? wrote: > >>> $PATH returns the value of PATH. For example, to display the path, use "echo >>> $PATH". >>> This is not Cygwin-specific though so further discussion is likely to be >>> off-topic for this list. > >> What i mean is that, how to only get the env path of windows, such as, >> `C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem". >> >> `echo $PATH' would display the path of cygwin: >> echo $PATH >> /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin > > cygpath -w -p "$PATH" > Just to clarify since there seems to be a little confusion concerning what the OP needs. Gary's suggestion will convert the value of the PATH environment variable as the shell used to run cygpath sees it to a value which is acceptable by Windows-native applications. That means that you'll likely have the additional elements as prepended by /etc/profile in the result. If you want to see the Windows PATH setting unmolested by Cygwin, you will either need to strip out the additions set by /etc/profile or avoid running under an environment modified by /etc/profile. -Jeremy -- 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 |