call bash shell script by dos command

1. at first we have a script say test.sh

2. to call it we need a bash shell environment in windows, say cygwin

3. then run below command: 

C:\XXXX\Cygwin\bin\bash --login "/cygdrive/e/scripts/test.sh"

that's it.

猜你喜欢

转载自sunxboy.iteye.com/blog/2000344