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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -