Source a .bat file from bash

Saurabh T saurabh@hotmail.com
Fri Aug 9 20:42:00 GMT 2013


Is there a way to source a .bat file from bash and have the paths and other environment variables set in it apply in cygwin?

For example

$ echo $PATH
/usr/local/bin:/usr/bin

$ cat file.bat
set path=%path%;C:\windows\something
set x=somevar

$ some_command file.bat

$ echo $PATH
/usr/local/bin:/usr/bin:/cygdrive/c/windows/something   <- Expected

$ echo $x
somevar   <- Expected

Is this possible?

Thanks,
saurabh 		 	   		  
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list