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: Interpret dos bat file in bash script


Thanks for your quick answer.
My cmd script use CALL statement, thus it is a little more complex than a simple sed.
I've hope that somebody has done a little dos command interpreter that could interpret simple .cmd files
.. I'll translate my cmd files into   sh language.

thanks again




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@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_                     igor@watson.ibm.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







-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit http://www.reuters.com/messaging

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.


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


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