Converting Shell script to Dos batch files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Converting Shell script to Dos batch files
# 1  
Old 05-12-2006
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.
# 2  
Old 05-12-2006
It is going to be difficult. The DOS shell provides very few of the things you're probably using a shell for; it has no glob matching, no real looping structures except IF x THEN GOTO y, no string operations, no quoted strings(!!) unless the application itself parses them, no elegant way to launch or wait on background processes, only very limited use of pipes, and can't even tell you what your working directory is!

If you posted a little of your existing code I could show how to convert some of it, perhaps, depending on if that was possible. Alternatively, a language like Perl might be more suitable.

Last edited by Corona688; 05-12-2006 at 12:06 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Converting the following batch script to Linux shell

I am currently migrating to ubuntu from my windows system. Now I am learing to convert all my batch scripts into linux shell. Although the common commands are more or less similar, but I found it difficult for the following set of commands in windows cmd: setlocal :PROMPT SET /P... (2 Replies)
Discussion started by: net.genere
2 Replies

2. Shell Programming and Scripting

Need help in batch renaming files with bash shell script.

I have some 50+ files in the following format : abcd_vish_running_ZEBRA_20140818.dat_08-14-2014_23:08:23 abcd_vish_running_ZEB-RA_20140818.dat_08-14-2014_23:08:35 abcd_vish_running_ZEB_RA_20140818.dat_08-14-2014_23:08:37 abcd_vish_running_RI-NG_20140818.dat_08-14-2014_23:08:42... (5 Replies)
Discussion started by: SriRamKrish
5 Replies

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

4. Shell Programming and Scripting

Dos batch script to execute unix shell script

Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh. Thanks in advance (2 Replies)
Discussion started by: Shri123
2 Replies

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

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

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

8. Shell Programming and Scripting

batch shell script to zip individual files in directory - help

help trying to figure out a batch shell script to zip each file in a directory into its own zip file using this code but it does not work tryed this also nothing seems to work , just ends without zipping any files i have over 3000 files i need to zip up individualy ... (7 Replies)
Discussion started by: wingchun22
7 Replies

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

10. Windows & DOS: Issues & Discussions

dos batch script

Please dont post duplicate threads :confused: (0 Replies)
Discussion started by: lorcan
0 Replies
Login or Register to Ask a Question