This is the mail archive of the
mailing list for the Cygwin project.
Re: how to get the windows PATH env in cygwin
Gary Johnson wrote:
> On 2009-12-01, ??????????????? wrote:
>>> $PATH returns the value of PATH. For example, to display the path, use "echo
>>> 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,
>> `echo $PATH' would display the path of cygwin:
>> echo $PATH
> 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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple