Subject: PATH/.bashrc tip
From: [email-masked] (Vassilii Khachaturov)

16 Feb 1998 20:50:17 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain
To: "Gnu-Win32 (E-mail)" <[email-masked]>

As Earnie recently told, it's a good idea to have gnuwin32 
things at the front of the path when in bash.
So are the win32 things when not in bash!
This is both speeding things up and making things behave
as one expects when there are name clashes.
A good example could be the "find" program, having completely
different semantics in WINNT\SYSTEM32 and in the gnuwin32 bin dir.
(BTW, I personally hate the WINNT find and always delete it, :-)
I have a post-installation script for NT intsllation, to tailor some
things
NT setup doens't care of.).

So, here is an excerpt for a .bashrc file that does exactly the job of 
weeding gnuwin-ish things out of one's path and putting them in front:

## CUT HERE ##
declare -x PATH="`perl \
	-e "@path = split ':', '$PATH';"\
	-e '@path = grep {(m|/gnu|) ? (push (@gnu, $_) && undef) : 1; }
@path;'\
	-e '@path = grep {(m|^/usr|) ? (push (@usr, $_) && undef) : 1; }
@path;'\
	-e "print join (':', @gnu, @usr, @path);"`"

echo Path: $PATH
## CUT HERE ##

(I assume that you have a working perl in your original path.)

Folks, following the recent conversations re. contributing things vs. 
arguing about contributing -- could someone please instruct me if I
should submit
such small things somewhere? (You can just do it and CC the list as well
to prevent multiple submits).

vassilii
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".