Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run bash command in a windows batch file

Is it possible to run a msys bash command in a batch script? Let say I have a.bat file in that I have my windows batch commands and in one line I will switch to msys bash to process msys specified commands. Like so:

[...] 
batch commands 
[...]
C:\mingw\msys\1.0\bin\sh -l
mount 'C:\mingw\local32' /local32
[...] 
bash commands 
[...]

Thanks for help!

jb_

like image 283
jb_alvarado Avatar asked Oct 15 '25 08:10

jb_alvarado


1 Answers

Why don't you just put all your shell commands in a separate file and just invoke that script from within the batch file in one line ?

C:\mingw\msys\1.0\bin\sh your-msys-script.sh
like image 143
Costi Ciudatu Avatar answered Oct 17 '25 02:10

Costi Ciudatu