This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: running .bat file in cygwin


On 2012-07-11 16:26Z, emon wrote:
> 
> Can anyone suggest me how I can run this .bat file at cygwin or refer me to
> a site.

Since you've decided to start using Cygwin, the best advice
is probably to write it as a shell script instead. There are
many tutorials on the web.

But if you really want to use a batch file...make sure it's
executable, then just run it--for example:

/tmp[0]$cat >eraseme.bat <<\EOF
echo Hello from batch file
EOF
/tmp[0]$chmod +x eraseme.bat
/tmp[0]$./eraseme.bat

C:\cygwin-1_7\tmp>echo Hello from batch file
Hello from batch file

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]