Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sh to batch

Posted on 2009-07-16
1
Medium Priority
?
316 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
flob9 earned 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

661 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