Converting UNIX scripts to DOS

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions Converting UNIX scripts to DOS
# 1  
Old 09-04-2003
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 environment. Are there any tools to convert unix to C?

I currently run UNIX scripts on windows through emulation (using Cygwin). However, my boss wants to do away with this as he believes it unnecessary Smilie I have several thousand lines of script, most of which i didn't write, that now has to be "converted"

HELP!
# 2  
Old 09-04-2003
Are you really running dos? Not windows of some kind?

I am not a windows expert, but I now have a notebook with windows xp on it. On xp at least, there are several scripting choices. You are probably thinking of batch files. Another choice is visual basic. Search for files that match *.vbs to see if you have some. Visual basic has a chance at handling those scripts. Forget batch files...there is no hope.

I don't know of any automatic converter. This will almost certainly be a rewrite.
# 3  
Old 11-28-2006
unless ur using advanced editing tools like AWK or sed unix scripts should work fine with minor modifications. cause if ur working on GNU environment it won't recognise the awk or sed instead it recognises gawk or gsed.
and windows wont read multiple line on code it should be in single line of code,
correct me if I am wrong.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Converting DOS filetype to UNIX

Hello folks I am working on a project that requires me to write a script that operates on a bunch of text files. When I try less file.txt I see a bunch of ^M's everywhere. Some Googling tells me that this is because the files have a DOS fileformat and found the following fixes: sed 's/^M$//'... (5 Replies)
Discussion started by: ksk
5 Replies

3. UNIX for Dummies Questions & Answers

converting scripts from dos 2 unix format

Hi, I am new to shell scripting and exploring it , I have developed few sample shell script but I have developed them on windows xp notepad and then saving them on folder and then testing them on cywgin and running perfectly...but these scripts are in dos format and I want to convert them in unix... (1 Reply)
Discussion started by: rahul125
1 Replies

4. Shell Programming and Scripting

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 :), but bad to loose UNIX :( ). 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... (4 Replies)
Discussion started by: Joe-K7
4 Replies

5. UNIX for Dummies Questions & Answers

How do you specify proxy server in dos/UNIX scripts?

I wrote scipts that automated file downloads from sFTP server. Not long ago a proxy server was introduce into the network, and my script failed. How do you specify proxy server in dos/UNIX scripts? :confused: Hirsi (2 Replies)
Discussion started by: hdirir
2 Replies

6. Windows & DOS: Issues & Discussions

telnet from unix to dos

hi eveybody, i use sco unix as server and dos as client . how i can connect from unix server to dos client ( how to telnet to dos and run commands?)? thanks. (8 Replies)
Discussion started by: shrb78
8 Replies

7. Shell Programming and Scripting

converting ksh scripts to sh

Hello All, I have a whole bunch of shell scripts written in a ksh environment and which successfully execute there. However, I found out that they eventually need to be used in a sh environment. So some commands like some_variable=$(some_command) fail because sh doesn't understand $(.....). I... (11 Replies)
Discussion started by: sherkaner
11 Replies

8. Windows & DOS: Issues & Discussions

converting ksh scripts--.bat in window's

hi evry one , I did some ksh scripts for file editing in AIX 5.2 ver, issue is while I was trying to run these scripts in windows box as batch files windows is not recognising the awk part of the ksh script,as it is GNU environment, so any one who can help me will be appreciated. this is the... (3 Replies)
Discussion started by: 2.5lt V8
3 Replies

9. 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

10. Shell Programming and Scripting

Converting Text File into XML using Unix Shell Scripts

Hi everyone, If someone out there could help me out with this problem. I would really appreciate it. I am trying to convert a file into xml format using Unix shell scripts. The file has fields with each field having a certain number of bytes, but the fields are not delimited by anything... (10 Replies)
Discussion started by: Laud12345
10 Replies
Login or Register to Ask a Question