www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/30/10:51:10

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Mon, 30 Aug 2004 10:48:49 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Christophe DOT Delarue AT reuters DOT com
cc: cygwin AT cygwin DOT com
Subject: Re: Interpret dos bat file in bash script
In-Reply-To: <T6bbb7b8aaa840a276c8b4@ritig7b.amers.ime.reuters.com>
Message-ID: <Pine.GSO.4.61.0408301042451.24572@slinky.cs.nyu.edu>
References: <T6bbb7b8aaa840a276c8b4 AT ritig7b DOT amers DOT ime DOT reuters DOT com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Mon, 30 Aug 2004, Christophe.Delarue wrote:

> Newbie in window$ ...
>
> I search in doc, web and never find something that can interpret dos
> command like .bat or .cmd files in the cygwin env

"cmd /c blah.bat"

> The .bat files I'd like to execute, set env variables required for a
> compilation process
> Is this definitly impossible ?

Yes.  The environment changes made in the batch files won't be visible in
the shell that executed them.  If you run something from the batch file
itself, though, you'll see the environment changes.

> I Only saw it wasn't possible, but do someone did a convertion at
> running time ?

If all your batch file does are "set"s (and maybe "rem"s), a simple sed
script should produce something that can easily be "eval"ed.  If you want
something more complex, you're basically on your own...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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