delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/07/11/12:59:43

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: mjD.OBqswBAPbVUxYJaYPvc61jLEnpq8VnBwJGdbEJOPA9xw
Message-ID: <4FFDB0CE.5030206@sbcglobal.net>
Date: Wed, 11 Jul 2012 16:58:54 +0000
From: Greg Chicares <gchicares AT sbcglobal DOT net>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: running .bat file in cygwin
References: <34146666 DOT post AT talk DOT nabble DOT com>
In-Reply-To: <34146666.post@talk.nabble.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019