The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Windows & DOS: Issues & Discussions
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


Windows & DOS: Issues & Discussions Questions involving Unix to Windows (Desktop or Server) go here. Any Windows/DOS questions should go here as well.


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP Unix Box to Windows Shell Script Jose Miguel Shell Programming and Scripting 2 07-11-2007 11:30 AM
to put the unix script output on windows desktop Assassin HP-UX 1 04-23-2007 07:52 PM
how to convert unix .ksh script to windows .batch script 2.5lt V8 Shell Programming and Scripting 1 11-28-2006 08:52 AM
Execute script on Unix/Linux from Windows brbillyh UNIX for Dummies Questions & Answers 4 07-10-2005 08:50 PM
get the output of unix script in windows csrope Shell Programming and Scripting 1 06-27-2005 09:39 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-17-2008
Registered User
 

Join Date: Mar 2008
Posts: 7
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
windows script to Unix

Dear All,

I am looking to understand the feasabilities to migrate the following batches command line into Unix plateform. If yes anyone can do it ?

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"=="BE" GOTO BE_FOLDERS

: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"

rem TO DELETE IN NEXT RELEASE !!!!!!!!
copy %VMAPdir%\Output\init\paramMarketData_multi.xml %VMAPdir%\Output\paramMarketData_multi.xml


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

XML_EXTRACT.bat


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

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

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


ETL_import_FTB.bat

@call "%sasdir%\sas.exe" -noautoexec -nosplash -dmsbatch -icon -sysin %VMAPdir%\SASCODE\Batch\ETL_import_FTB.sas

@if %errorlevel%==0 echo RC=%errorlevel%
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-17-2008
jgt jgt is offline
Registered User
 

Join Date: Apr 2007
Location: 44.21.48N 80.50.15W
Posts: 348
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
With the exception of the sas.exe lines, all the lines convert easily.
Do the following:
replace all \ with /
replace all %xxx% with $xxx
replace "del /q" with "rm"
make sure none of your file names have embedded spaces, or special characters.
mkdir is mkdir
rmdir is rmdir
replace the "if goto" construct with "if ....endif".

An alternative is to use a product like Samba on the unix system, export a share, and use your regular Windows script to manipulate the files.
Reply With Quote
  #3 (permalink)  
Old 03-18-2008
vbe vbe is online now
Registered User
 

Join Date: Sep 2005
Posts: 290
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
even the sas bit can easily be converted to something that works under unix but for that you need to know which version and on what unix...
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 02:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102