windows - Creating batch file to start cygwin and execute specific command -


i want create batch file thats start cygwin , executes specific command (the command read bash file , executes command inside it).

this batch file have developed, works extent. cygwin terminal opens , tries read bash file, cannot execute commands inside:

@echo off  c:\cygwin64\bin\mintty.exe -li /cygdrive/c/(path-to-bash-file-location)/(mybashfile)  pause 

how can make work?

from batch file, launch cygwin's bash shell , use login flag. provides foundation setting path , environment variables through .bash_profile or .bashrc files. believe may source of difficulties.

@ echo off c:\cygwin64\bin\bash --login -c "cd ~/path/to/desired; ./mybashfile.sh" 

if provide more details nature of bash file, can more specific. luck.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -