Anyone know of a tool or site that converts unix (bourne) shell scripts
to dos batch files (for NT/2000/XP)?
Both the above ( and others) will convert a nt2000 machione to one
capable of interpretinmg bourne shell scripts.
Antother possibility is cygnus.
Otherwize the wintendo/dos shells are hoplessly incapable, there is no way
of "emulating" the functionality of bourne-scripts on doscmd.
AFAIR "cygwin", but I wouldn't waste my time with it, option 1 is for sureQuote:> Antother possibility is cygnus.
Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM
The best solution I know of is to install a pseudo-UNIX environment on
the Winders box. One that may be able to interpret the script as is.
The script may well need to be tweaked but not completely re-written.
Two free options are U/Win from
http://www.research.att.com/sw/tools/uwin/. It comes with ksh, sh and
tcsh. I use it for scripting on my Win2k box at work. The other is
cygwin from cygwin.com. It has a similar capability.
These packages come with core UNIX commandline programs ported to
Winders. So if you script uses 'cp' they provide a 'cp' that will do
what the script expects. No need to map cp calls to copy calls.
There are also commercial solutions from folks like mks.com and
Senior Software Engineer
NimbleGen Systems Inc.
What I want is a tool that would take a first cut at reading in a shellQuote:> native NT/2K/XP shell? They are not the same thing. I'll assume the
We have a Java app that makes calls to shell scripts for
pre/post-installation of our product on Solaris and Linux.
We need to have DOS batch file equivalents for our NT/2000/XP installs.
Unfortunately we don't control the target box so we can't use
interpreters (nor would we want to as they are only required for
I have asked in c.o.msdos.programmer and I'm hearing its impossibleQuote:> latter. If such a thing exists it would be from a Winders centric
> source. So you might try asking in ms-windows centric forums about such
> a tool. Which you may have already done.
I have also come accross this:
And for a Dos to Unix script check out:
Specifically: batcsh10.zip 28440 Jan 12 1994
Convert MS-DOS batches to Unix csh scripts, fw, B.Pierpoint
Which gives some hope so I guess I'll keep looking. Thanks.
> www.freebsd.org or www.redhat.org
> Both the above ( and others) will convert a nt2000 machione to one
> capable of interpretinmg bourne shell scripts.
It depends what one requires I guess - I'm not looking for the fullQuote:
> Antother possibility is cygnus.
> Otherwize the wintendo/dos shells are hoplessly incapable, there is no way
> of "emulating" the functionality of bourne-scripts on doscmd.
Short of installing a UNIX shell on the Windows box, the best
alternative is to convert the script to C (I remember seeing tools
to do that) and compiling it for Windows.
Chris F.A. Johnson http://cfaj.freeshell.org
My code (if any) in this post is copyright 2003, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
I have a small shell script which I want to run in a DOS environment.
IMO the easiest way will be to rewrite it as a batch file.
However my knowledge of msdos syntax is rather poor, I really did not
succeed doing it myself.
Can anyone please help me to make a batch file out of this shell script?
# remove .tex extension (if any)
name=`echo $1 | sed 's/\(.*\)\.tex$/\1/'`
# if file exists
if [ -f "$name.tex" ]; then
# if last command was successful
if [ $? = '0' ]; then