Sponsored Content
Top Forums Shell Programming and Scripting HowTo translate KSH Scripts to DOS Batch Files ? Post 302408974 by Joe-K7 on Wednesday 31st of March 2010 02:20:15 AM
Old 03-31-2010
Question HowTo translate KSH Scripts to DOS Batch Files ?

Hi there,

in near future I have to change my work surrounding from HP UNIX to Windows Vista (great to get rid of old hardware Smilie, but bad to loose UNIX Smilie ). As I heavily use KSH scripts to do my job, I was wondering, if there is any HowTo available, supporting me in re-writing the scripts to match DOS.

Could anyone help me out on this ? The main functionalties of KSH I am using are
- path/file opertations
- using the "function" ability
- basic mathematical functions

Does DOS deliver similar functionality (I fear not) ?

Remark:
I've claimed to get at least a Linux installation, but this was denied. I have to use Windows. The MKS toolkit is requested, but not yet clear, if it will be installed Smilie ,

Thanks for your support
Joe
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting Shell script to Dos batch files

Hi friends! I am having some simple shell script files to build postgresql database and all. Now i want to convert those scripts to dos batch scripts(to run on windows XP/2000/NT) because there is no need of unix emulation for latest release of postgresql. Please somebody help me. (1 Reply)
Discussion started by: darwinkna
1 Replies

2. Windows & DOS: Issues & Discussions

Converting UNIX scripts to DOS

Is there a tool available to convert UNIX (BASH Shell) scripts to DOS scripts? I understand that DOS scripting is far inferior to unix scripting, and therfore this conversion may not be possible. Alternativley, perhaps I could convert my Unix scripts to C... then compile it for a windows... (2 Replies)
Discussion started by: Crozz
2 Replies

3. Windows & DOS: Issues & Discussions

dos batch script

Please dont post duplicate threads :confused: (0 Replies)
Discussion started by: lorcan
0 Replies

4. Windows & DOS: Issues & Discussions

dos batch script

We need to write a dos batch script that does following in order numbered below: Connect to all UNIX boxes using IP,userid and password from a file. validate if login was successful check if there is at least 30mb disk space in the home folder of the user Check if there are any processes... (3 Replies)
Discussion started by: chandraachii
3 Replies

5. UNIX for Dummies Questions & Answers

DOS batch file to capture routers log

Hi, Please help to write DOS /Perl script to capture router AAA logs to store in file. RADIUS: id 1, priority 1, host 59.163.6.103, auth-port 1901, acct-port 1902 State: current UP, duration 1928071s, previous duration 0s Dead: total time 2798488914s, count 0 Authen:... (0 Replies)
Discussion started by: patilanna
0 Replies

6. Windows & DOS: Issues & Discussions

variable in dos batch file

Sir I have a very old cobol programme (source not availble). On execution and invoking some menu commands, depending upon the "pressed menu commands" it is writing certain values into a dos batch file. At the end of cobol file, this batch file gets exeuted. On keying in the Drive from which you... (6 Replies)
Discussion started by: chssastry
6 Replies

7. UNIX for Dummies Questions & Answers

Unix shell, Dos batch

Is the unix shell script equivalent to dos batch command? Thanks (2 Replies)
Discussion started by: zhshqzyc
2 Replies

8. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

9. Shell Programming and Scripting

Translate csh to ksh

Hi! I need to translate those line in csh (to initialise variable) into ksh construct. Any help would be appreciated! I don't know how to replace them :( Thanks Hulu setenv TestHul "$0 $*" setenv JG `setenvp "JG" "" "$*"` setenv A_1 `setenvp "A_1" "NA" "$*"` Please use next time... (2 Replies)
Discussion started by: patator67
2 Replies

10. Shell Programming and Scripting

Converting DOS Batch file to Shell Script

Hi, This is my DOS Batch file. @echo off echo "Program Name :" %0 rem echo "Next param :" %1 echo "Next param :" "Username/Password" echo "User Id :" %2 echo "User Name :" %3 echo "Request ID ... (4 Replies)
Discussion started by: Rami Reddy
4 Replies
mcopy(1)						      General Commands Manual							  mcopy(1)

NAME
mcopy - mtools utility to copy DOS files to and from a UNIX operating system SYNOPSIS
mcopy [-mntv] sourcefile targetfile mcopy [-mntv] sourcefile [sourcefiles...] targetdirectory OPTIONS
Preserves the file modification time. Specifies that a warning is not issued when an existing file is specified as the target file. If this option is not specified, the mcopy command verifies whether or not to overwrite an existing file. Specifies a text file transfer. Line terminators are converted to the appropriate format. Specifies verbose mode. The new file name is displayed if the name supplied is invalid. DESCRIPTION
The mcopy command copies the specified file to the named file, or copies multiple files to the named directory. The specified files or directories can be either DOS or UNIX files. If the file is a text file line terminators are converted to the appropriate format. Using a drive letter designation on the DOS files such as 'a:' determines the direction of the transfer. A missing drive designation indi- cates a UNIX file whose path starts in the current directory. DOS subdirectory names that contain the '/' or '' separator are supported. If you use the '' separator or wildcards, you must enclose file names in quotes to protect them from the shell. The mcd command can be used to establish the device and the current working directory (relative to DOS), otherwise the default is A:. Not all UNIX file names are supported in the DOS world. The mcopy command may have to change UNIX names to fit the DOS file name conven- tions. The following table shows some examples of file name conversions: ----------------------------------------------- UNIX name DOS name Reason for the change ----------------------------------------------- thisisatest THISISAT file name too long file.stuff FILE.STU extension too long prn.txt XRN.TXT PRN is a device name .abc X.ABC null file name hot+cold HOTXCOLD illegal character ----------------------------------------------- RESTRICTIONS
The following restrictions exist: Omitting the destination directory is not supported. Using the plus (+) operator is not supported. Using a drive letter designation on DOS files is required with this command only, not with other mtools. EXIT STATUS
The following exit values are returned: Success. Failure. ENVIRONMENT VARIABLES
The following environment variables affect the execution of mcopy: If set, this variable names the file that contains the name of the cur- rent mtools working directory as established by the mcd command. If this variable is not set, the file $HOME/.mcwd is used. FILES
Contains the name of the current mtools working directory as established by the mcd command. If this file does not exist, the default mtools working directory is A:. Executable file SEE ALSO
Commands: dos2unix(1), mcd(1), mdiskcopy(1), mread(1), mtools(1), mwrite(1), unix2dos(1) mcopy(1)
All times are GMT -4. The time now is 01:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy