converting bash script to .bat

Posted by Robokop on Stack Overflow See other posts from Stack Overflow or by Robokop
Published on 2011-01-10T20:41:37Z Indexed on 2011/01/10 20:53 UTC
Read the original article Hit count: 199

Filed under:
|
#!/bin/bash

function usage(){
cat <<EOF
USAGE: $0 [strategylist]

  valid strategies are:
    ALLD
    ALLC
    TitForTat
    JOSS
    WeightedRandom
    Tester
EOF
exit 1
}

[ -z $1 ] && usage

javac robsAgents/*.java robsAgents/behaviours/*.java

agentlist='leader:robsAgents.TournamentLeader'
agentlist=$agentlist";$1:robsAgents.Contestant"

while shift;
do
    agentlist=$agentlist";$1:robsAgents.Contestant"
done

java jade.Boot -gui -host 127.0.0.1 "$agentlist"

i have above bash script and have no access to a windows computer and i need to convert it to a .bat file, but don't even know how to do the shift and argument parsing

© Stack Overflow or respective owner

Related posts about bash

Related posts about batch-file