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]

Recover the original dos PATH within cygwin


I use to have c:\cygwin\bin in my dos path, and I normally use cygwin
version of gawk to implement extensions to the w2k/dos command prompt. I
have written a "whence" utility that prints the full path of the
commands I put on the command line.

The problem is: the cygwin version of gawk does not have access to the
dos-version of the PATH variable, but only to the cygwin-adapted one
(/cygpath/c/... and so on). Thus I could not print out the dos-path of
the commands requested.

I found a solution, encapsulating the gawk call in a dos .cmd file, that
passes "%PATH%" along with the other parameters: my .awk file now uses
the path found in ARGV[1], instead of the ENVIRON one.

Is there a way to access the original dos PATH from a cygwin command? I
would like to have a copy of the dos path in a, say, PATH_DOS_SAVED
environment variable or something like. I think this should be a feature
offered by the architecture itself, kernel, shell or whatsoever.

BTW, when my dos-path variable ends with a backslash (sometimes the path
is modified by a new install), enclosing it in quotes makes a mess: the
closing quote is escaped! A saved path would solve this problem too.

Thank you
	Pietro Toniolo
	Milano, Italy




-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.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]