Solved

sh to batch

Posted on 2009-07-16
1
308 Views
Last Modified: 2013-12-04
I have the following .sh file

Can someone please let me know how to convert it to a batch file which can be used in windows.

Thank you
#!/bin/ksh
 
 

Usage ()

{

 prog=`/bin/basename $0`

 echo "Usage: $prog [antfile]"

 echo ""

 echo "options to be used without []:"

 echo ""

 exit 0;

}
 

if [ -z "$1" ]; then

    Usage

    exit 1

fi
 
 

$JAVA_HOME/bin/java -Xmx512m -Dlogpath=tmp/log -cp custom/lib/ComposerHeadless/startup.jar org.eclipse.core.launcher.Main -clean -data tmp/work -application org.eclipse.ant.core.antRunner -buildfile $1

Open in new window

0
Comment
Question by:ank9
1 Comment
 
LVL 14

Accepted Solution

by:
flob9 earned 500 total points
ID: 24867229

@echo off
 

if "%1"=="" goto :usage
 

@echo on

%JAVA_HOME%/bin/java -Xmx512m -Dlogpath=tmp/log -cp custom/lib/ComposerHeadless/startup.jar org.eclipse.core.launcher.Main -clean -data tmp/work -application org.eclipse.ant.core.antRunner -buildfile %1
 

goto :end
 

:usage

echo Usage: %0 [antfile]

echo:

echo options to be used without []:

echo:
 

:end

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 66
Install MySQL 5.6 and PHP on Centos Linux 6 94
Arrays.asList  VS  ArrayList 4 43
Martian Packets Unix 5 27
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now