473,748 Members | 2,227 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting windows .cmd files to UNIX

3 New Member
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%\b in\admin_jms.cm d" goto nokHome

REM Verify if JAVA_HOME is well defined

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



set CONFIG_DIR=%JOR AM_HOME%\config

set JORAM_LIBS=%JOR AM_HOME%\ship\l ib

set RUN_DIR=%JORAM_ HOME%\run



REM Building the Classpath

set CLASSPATH=%JORA M_LIBS%\joram-mom.jar

set CLASSPATH=%CLAS SPATH%;%JORAM_L IBS%\joram-shared.jar

set CLASSPATH=%CLAS SPATH%;%JORAM_L IBS%\JCup.jar

set CLASSPATH=%CLAS SPATH%;%JORAM_L IBS%\jakarta-regexp-1.2.jar

set CLASSPATH=%CLAS SPATH%;%JORAM_L IBS%\ow_monolog .jar

set CLASSPATH=%CLAS SPATH%;%JORAM_L IBS%\jmxri.jar

set CLASSPATH=%CLAS SPATH%;%RUN_DIR %



mkdir %RUN_DIR%

copy %CONFIG_DIR%\a3 config.dtd %RUN_DIR%\a3con fig.dtd

copy %CONFIG_DIR%\a3 debug.cfg %RUN_DIR%\a3deb ug.cfg

copy %CONFIG_DIR%\ce ntralized_a3ser vers.xml %RUN_DIR%\a3ser vers.xml

copy %CONFIG_DIR%\jn di.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.ag ent.AgentServer %1 ./s%1

cd "%RUN_DIR%"
"%JAVA_HOME%\bi n\java" -classpath %CLASSPATH% fr.dyade.aaa.ag ent.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%\s amples\bin\admi n.bat" goto nokHome

set RUN_DIR=%JORAM_ HOME%\samples\r un

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 2381
patrickdub
3 New Member
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
2617
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 install the scripts. I'm looking for an easier way to install the Python portion. I've been referred to: http://www.mcmillan-inc.com/install1.html Which application would people recommend for creating a standalone
19
2484
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 heavy users of shell scripts, for exports, backups, etc.
1
1588
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 distances from 4 known points to common xyz coordinates. Anyone know where it is? Hul -- - for email, put the word "keeper" in the subject line -
3
7488
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 on her local machine. Everything looks pretty good. OpenLDAP/cygwin works great. PostgreSQL works great. Apache runs. PHP runs. But when I try to connect to my PostgreSQL server using PHPPgAdmin, I
1
1791
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 can't help. I have a number of files created in UNIX that have the UNIX end of line (EOL) character. I want to read these files in python, modify some lines, and then write them
0
956
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. To get these modules into windows, should I do the following?
4
2340
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 format? Cheers!!! V
1
4342
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 is working well. When Multibyte characters are involved like Japanese, Chinese or Korean, I need to convert UTF8 to ANSI encoding to get the correct values.
1
3834
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 windows directory tree to mimic the unix tree as closely as possible, but I don't want duplicate files and other inconsistencies. I have come up with an idea but I don't know how close it fits a "typical" windows project. If you know of specific...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9326
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8245
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.