|Bash Shell Script and a C Program...How to Port Both to Windows? email@example.com (2003-05-15)|
|Re: Bash Shell Script and a C Program...How to Port Both to Window firstname.lastname@example.org (Lex Spoon) (2003-05-23)|
|Re: Bash Shell Script and a C Program...How to Port Both to Windows? email@example.com (Scott Nicol) (2003-05-24)|
|Re: Bash Shell Script and a C Program...How to Port Both to Windows? firstname.lastname@example.org (Lex Spoon) (2003-05-29)|
|From:||Lex Spoon <email@example.com>|
|Date:||29 May 2003 03:32:34 -0400|
|Organization:||Georgia Institute of Technology|
|References:||03-05-105 03-05-173 03-05-194|
|Posted-Date:||29 May 2003 03:32:34 EDT|
"Scott Nicol" <firstname.lastname@example.org> writes:
> "Lex Spoon" <email@example.com> 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.
Return to the
Search the comp.compilers archives again.