Subject: RE: converting win batch file to Unix/Linux exe
From: Leif Sawyer (lsawyer@gci.com)
Date: Mon Sep 30 2002 - 09:03:16 AKDT
Justin Dieters replied to
Mehran, who asked about converting DOS Batch files to shell scripts:
> Hmm... The first thing I would do is replace all the REM's
> with '#' chars.
>
> Second, all the variables that are in the form %var% change to $var.
>
> Third, change all the semicolons separating arguments to
> regular colons.
>
> Also, the 'set' commands may need changed to be 'export' -
> but i'm not quite sure what the difference is between the two
>
> Lastly, double check that 'java' is in your paths.
Don't forget to change all path characters like dos\windows\foo\bar
to forward-slash "dos/windows/foo/bar"
for concatenated paths, you need to change the semi-colon to colon:
"%appcp%;%classpath%" to "$appcp:$classpath"
given all of that: (and i uppercase'd the variables to make them stand out.
not necessariy, but easier to see)
<------------>8 cut here 8<------------------------------->
#!/bin/bash
#************************************************
#*** INPUT CONFIGURATION FILE
#************************************************
CONFIG="xml:///../config/configuration.xml"
#************************************************
#*** CLASSPATHS
#************************************************
PD=..\lib
DBE=$PD/db2ejdbc.jar
JNET=$PD/jnet.jar:$PD/jcert.jar:$PD/jsse.jar
JBCL=$PD/jbcl.jar
XERCES=$PD/xerces.jar
LOG4J=$PD/log4j-core.jar
TAB=$PD/tabsplitter.jar
ETECHLOG=$PD/etechlog.jar
COMMON=$PD/common.jar
PC=$PD/PerformanceCalculations.jar
IMAGES=$PD/images.jar
CH=$PD/Signature.jar
APPCP=$CH:$PD:$PC:$ETECHLOG:$IMAGES:$COMMON:$DBE
APPCP=$APPCP:$JNET:$JBCL:$XERCES:$LOG4J:$TAB:
if [ -n "${CLASSPATH}" ]; then
APPCP=$APPCP:$CLASSPATH
fi
#************************************************
#*** APPLICATION MAIN
#************************************************
APPMAIN=com.airmantech.workflow.WorkFlowMain
java -Xmx400m -classpath "$appcp" $APPMAIN $CONFIG
<------------>8 cut here 8<---------------------->
or something like that...
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
This archive was generated by hypermail 2a23 : Mon Sep 30 2002 - 09:03:20 AKDT