473,383 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Converting windows .cmd files to UNIX

Hi,
I'm wondering what kind of things do I need to look out for when converting my .cmg scripts to Unix scripts. (I want the same inputs and outputs, but I'm now running on a Unix Server.

I know that the scripts are basically similar, and that a lot of the commands will probably remain the same, but I'm too unfamiliar with shell commands to know exactly.

Are there any useful links available on this topic, or some sound advice...... or maybe even look at one of the scripts.




-----------------------------------------------------
@echo off

REM Verify if JORAM_HOME is well defined

if not exist "%JORAM_HOME%\bin\admin_jms.cmd" goto nokHome

REM Verify if JAVA_HOME is well defined

if not exist "%JAVA_HOME%\bin\java.exe" goto nokJava



set CONFIG_DIR=%JORAM_HOME%\config

set JORAM_LIBS=%JORAM_HOME%\ship\lib

set RUN_DIR=%JORAM_HOME%\run



REM Building the Classpath

set CLASSPATH=%JORAM_LIBS%\joram-mom.jar

set CLASSPATH=%CLASSPATH%;%JORAM_LIBS%\joram-shared.jar

set CLASSPATH=%CLASSPATH%;%JORAM_LIBS%\JCup.jar

set CLASSPATH=%CLASSPATH%;%JORAM_LIBS%\jakarta-regexp-1.2.jar

set CLASSPATH=%CLASSPATH%;%JORAM_LIBS%\ow_monolog.jar

set CLASSPATH=%CLASSPATH%;%JORAM_LIBS%\jmxri.jar

set CLASSPATH=%CLASSPATH%;%RUN_DIR%



mkdir %RUN_DIR%

copy %CONFIG_DIR%\a3config.dtd %RUN_DIR%\a3config.dtd

copy %CONFIG_DIR%\a3debug.cfg %RUN_DIR%\a3debug.cfg

copy %CONFIG_DIR%\centralized_a3servers.xml %RUN_DIR%\a3servers.xml

copy %CONFIG_DIR%\jndi.properties %RUN_DIR%\jndi.properties



echo == Launching a persistent server#%1 ==

rem start /D %RUN_DIR% /B %JAVA_HOME%\bin\java -classpath %CLASSPATH% fr.dyade.aaa.agent.AgentServer %1 ./s%1

cd "%RUN_DIR%"
"%JAVA_HOME%\bin\java" -classpath %CLASSPATH% fr.dyade.aaa.agent.AgentServer %1 ./s%1

goto end

:nokHome

echo The JORAM_HOME environment variable is not defined correctly

echo This environment variable is needed to run this program

goto end

:nokJava

echo The JAVA_HOME environment variable is not defined correctly

echo This environment variable is needed to run this program

goto end



:end
-------------------------------------------------------------------------------------
here's another small one!
-------------------------------------------------------------------------------------
@echo off
REM Verify if JORAM_HOME is well defined
if not exist "%JORAM_HOME%\samples\bin\admin.bat" goto nokHome

set RUN_DIR=%JORAM_HOME%\samples\run

echo == Cleaning the persistence directories and configuration settings ==
rmdir /s /q %RUN_DIR%
goto end
:nokHome
echo The JORAM_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end

:end

------------------------------------------------------------------------------------


thanks in advance, I appreciate any help you have to give,
Patrick
Aug 14 '07 #1
1 2346
so, the first line should read......

I'm wondering what kind of things do I need to look out for when converting my (windows) .cmD scripts to Unix scripts.
Aug 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sandeep Gupta | last post by:
Hi, I've written a commercial application that uses Python scripts for some of the functionality. Installing the Python portion of the application requires me to first install Python, and then...
19
by: DW | last post by:
Hi, all... I have a sizeable database running under Oracle 9.2.0.4 under AIX 5.2.0. I am faced with an impending move to a Windows environment, running under SQL 2000. Currently, we are...
1
by: Hul Tytus | last post by:
comp.lang.c converting a point known by 4 distances to xyz coordinates? Amongst all the librarys on the internet there is certainly source for a routine that converts a point known by 4...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
1
by: Nick Wain | last post by:
Hello All, I'm relatively new to PYTHON, using PYTHON 2.4 on Windows XP. I'm having a problem as below. I've asked some other people in my office who are more experienced in PYTHON, but they...
0
by: AIM | last post by:
Hi all, I have a general question and some advice is needed. Over time, I am running into python modules with setups that are just made for linux/unix. I have python installed on windows. ...
4
by: VC | last post by:
Hi, Greetings. Not sure if this is the right forum..... In case I should visit some other forum please let me know. Does Dot.NET provide a quick method/way to convert a UNIX text file to DOS...
1
by: Tejas | last post by:
Hi, I am using ldap_get_values() call to get the user attributes from LDAP. This call is returning the user attributes in UTF-8 encoding and its a PCHAR*. For normal English characters this...
1
RRick
by: RRick | last post by:
I have a unix C++ project that needs to be converted over to windows visual studio. I'm not sure of the exact version of VS, but it's a recent version, probabIy 2003 or 2005. I would like the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.