Related articles |
---|
Bash Shell Script and a C Program...How to Port Both to Windows? leonworkman_2000@yahoo.com (2003-05-15) |
Re: Bash Shell Script and a C Program...How to Port Both to Window lex@cc.gatech.edu (Lex Spoon) (2003-05-23) |
Re: Bash Shell Script and a C Program...How to Port Both to Windows? snicol@apk.net (Scott Nicol) (2003-05-24) |
Re: Bash Shell Script and a C Program...How to Port Both to Windows? lex@cc.gatech.edu (Lex Spoon) (2003-05-29) |
From: | Lex Spoon <lex@cc.gatech.edu> |
Newsgroups: | comp.compilers |
Date: | 29 May 2003 03:32:34 -0400 |
Organization: | Georgia Institute of Technology |
References: | 03-05-105 03-05-173 03-05-194 |
Keywords: | Windows, interpreter |
Posted-Date: | 29 May 2003 03:32:34 EDT |
"Scott Nicol" <snicol@apk.net> writes:
> "Lex Spoon" <lex@cc.gatech.edu> wrote in message
>> You can probably ship just bash.exe from Cygwin. Bash.exe is a
>> perfect interpreter for your language, so seems best to try and find a
>> way to use it.
>
> Shell scripts, except for the most trivial examples, call external
> programs. There's likely a whole bunch of stuff you need (ls, grep,
> awk, sed, head, ...).
>
> If the script isn't too tricky and if you feel brave, you may be able
> to convert the shell script to a DOS batch file. See
> http://www.uwasa.fi/~ts/http/http2.html#batch for a large list of
> online batch file programming pages. Batch files we a dying breed
> before advanced languages like Java came along and made them necessary
> again. I can't recommend any one page in particular - I think I'm
> like most programmers that get done what is necessary in .bat files
> and then leaves well enough alone.
Ah yes, you do need all the other programs. Nevertheless, "all" the
other programs is still likely to be a short list, perhaps 20 or so.
Each of these is likely a single executable, and you might have to do
something about the standard C library. It should be nothing like
trying to get gcc installed with its zillions of files.
DOS batch files always struck me as disappointingly weak, though I
can't remember the specific reasons why. They are okay for running a
command or two, but they are much worse than Unix shell scripts once
you start doing subroutines and loops and such. If one were to
rewrite a Unix script to run on DOS, I would think it easier to use
almost any language, even C.
Lex
Return to the
comp.compilers page.
Search the
comp.compilers archives again.