Scott Wegner wrote: > My question is, whether there is a way to easily strip the Cygwin > entries from the path for the batch call. Hopefully the solution would > be portable, and not affect the environment outside of the bash script.
PATH is just a regular variable like any other. If you want to remove something from it, use whatever text processing tool you like. The shell lets you set environment variables only for the command being executed using the syntax "var=value command arg ...", so: PATH=$(perl -e 'print join(":", grep([EMAIL PROTECTED]/(usr/)?bin@, split(":", $ENV{PATH})))') cmd.exe /k batch-script.bat params Brian -- 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/