Solved

sh to batch

Posted on 2009-07-16
1
307 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
Comment Utility

@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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

772 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

12 Experts available now in Live!

Get 1:1 Help Now