Script portability


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script portability
# 1  
Old 03-18-2008
Script portability

Hello,

May I the right place if I need competencies to migrate DOS script into Unix platforme?

Thanks in advance

Thierry
# 2  
Old 03-18-2008
You can always try...
Are you talking about srcipt on win servers using (such as MKS toolkit..) ksh?
or pure DOC .bat?
# 3  
Old 03-18-2008
Scrip below

UDB_import_AAA.bat

del /Q %VMAPdir%\Excel_files\*.*
del /Q %VMAPdir%\Log\*.*
del /Q %VMAPdir%\Output\*.*
del /Q %VMAPdir%\Reports\Input\*.*
del /Q %VMAPdir%\Reports\OutputCSV\*.*
rmdir /Q /S %VMAPdir%\Reports\Output
mkdir %VMAPdir%\Reports\Output

IF "%2"=="LU" GOTO LU_FOLDERS
IF "%2"=="BE" GOTO BE_FOLDERS

:LU_FOLDERS
mkdir %VMAPdir%\Reports\Output\CPB
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\CPB
mkdir %VMAPdir%\Reports\Output\DBP
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\DBP
mkdir %VMAPdir%\Reports\Output\Francophone
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\Francophone
mkdir %VMAPdir%\Reports\Output\Italie_Espagne_NGI
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\Italie_Espagne_NGI
mkdir %VMAPdir%\Reports\Output\Luxembourg_Allemagne
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\Luxembourg_Allemagne
mkdir %VMAPdir%\Reports\Output\Neerlandophone
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\Neerlandophone
mkdir %VMAPdir%\Reports\Output\PB_Finance
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\PB_Finance
mkdir %VMAPdir%\Reports\Output\Risk
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\Risk
mkdir %VMAPdir%\Reports\Output\Other
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\Other
GOTO Launch_IMPORT

:BE_FOLDERS
mkdir %VMAPdir%\Reports\Output\Risk
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\Risk
mkdir %VMAPdir%\Reports\Output\Other
copy %VMAPdir%\Params\Readme.txt %VMAPdir%\Reports\Output\Other
GOTO Launch_IMPORT


:Launch_IMPORT
@call "%sasdir%\sas.exe" -noautoexec -nosplash -dmsbatch -icon -sysin %VMAPdir%\SASCODE\Batch\UDB_import_AAA.sas -sysparm "%1 %2"

@if %errorlevel%==0 echo RC=%errorlevel%




UDB_CREATOR.bat


@call "%sasdir%\sas.exe" -noautoexec -nosplash -dmsbatch -icon -sysin %VMAPdir%\SASCODE\Batch\UDB_CREATOR.sas -sysparm "%1 %2"
# 4  
Old 03-18-2008
You posted the same question in another forum recently, and got an answer there. Why do you think we believe you will read the answer this time?
https://www.unix.com/windows-dos-issu...ript-unix.html
era
# 5  
Old 03-18-2008
Sorry

Very sorry I did not check...

Thanks for the reply

Can you do the changes for me? as I am uselss for this type of transformation
# 6  
Old 03-18-2008
Do you pay better than my employer?
era
# 7  
Old 03-18-2008
I agree with era, this thread should be ended and continued in https://www.unix.com/windows-dos-issu...ript-unix.html
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies

2. Shell Programming and Scripting

Shell script works fine as a standalone script but not as part of a bigger script

Hello all, I am facing a weird issue while executing a code below - #!/bin/bash cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset sh UKBA_publish.sh UKBA 28082015 3 if then echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
Discussion started by: ektubbe
2 Replies

3. UNIX for Dummies Questions & Answers

Calling a script from master script to get value from called script

I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below. #masterscript.sh ./callingscript.sh echo $fileExist #callingscript.sh echo "The script is called"... (2 Replies)
Discussion started by: Raj Roy
2 Replies

4. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

5. UNIX for Dummies Questions & Answers

portability of int arrays from 32 to 64 bit systems

Dear All, I'm porting my scientific program from 32 to 64 bit system (use gcc, CentOS) and feel myself absolutely confused after reading general internet advices for that. Could you help me, please. The question is: can I use "old style" on 64 bit: -------- int * myIntArray; ... (3 Replies)
Discussion started by: German1234
3 Replies

6. Shell Programming and Scripting

Script Portability

Hi, I am writing a BASH shell script for a client. I am using BASH on a Macintosh Powerbook G4 running Leopard. My client will be using BASH on a PC running Ubuntu. My questions all revolve around making my script portable so that it will run on his machine. - Do I need to get any other... (2 Replies)
Discussion started by: msb65
2 Replies

7. Shell Programming and Scripting

create a shell script that calls another script and and an awk script

Hi guys I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file. #!/bin/sh echo " $2 $3 $4 $5 $6 $7 isql -w400 -U$2 -S$5 -P$3 << xxx use $4 go print"**Changes to the table... (0 Replies)
Discussion started by: magikminox
0 Replies

8. Shell Programming and Scripting

portability issue linux(2.6) solaris10

the following simple scripts work fine on linux but fail on solaris: #!/bin/bash eval /usr/bin/time -f \'bt=\"%U + %S\"\' ./JUNK >> ./LOG 2>&1 cp ./LOG ./LOG_joe LC_joe=`cat ./LOG | wc -l` LC_joe=`echo $LC_joe-1|bc` tail -1 ./LOG > ./tmp head -$LC_joe ./LOG_joe > ./LOG rm ./LOG_joe ... (1 Reply)
Discussion started by: joepareti
1 Replies

9. Programming

A C program required for portability

I have to solve a problem for my wife who is engaged in Research in Breast Cancer. 1. She has frequently to search a long single line of alphabetic characters (lower case) for an exact match of a string. e.g.... (1 Reply)
Discussion started by: nmsinghe
1 Replies
Login or Register to Ask a Question