From: vassilii AT optimedia DOT co DOT il (Vassilii Khachaturov) Subject: PATH/.bashrc tip 16 Feb 1998 20:50:17 -0800 Message-ID: <317FF5D11BF2D011B81E00A024960DC42254D5.cygnus.gnu-win32@axis.optimedia.co.il> Mime-Version: 1.0 Content-Type: text/plain To: "Gnu-Win32 (E-mail)" 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 "gnu-win32-request AT cygnus DOT com" with one line of text: "help".