![]() |
|
|
|||||||
| 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 |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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% |
| Forum Sponsor | ||
|
|
|
|||
|
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. |