[Solved] DOS to Unix Help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] DOS to Unix Help
# 1  
Old 01-26-2012
[Solved] DOS to Unix Help

I am in the process of converting a batch script into a shell script for CentOS but am a complete Unix newb.

I have the follow Windows batch code:
Code:
for /f %%a in (C:\STEAMINVITE\extractor\workfile3.tmp) do C:\Python27\Python.exe C:\STEAMINVITE\extractor\sidconv.py %%a > C:\STEAMINVITE\extractor\workfile.txt

I do not have the slightest idea how I would get this doing the same function in Unix.

Many thanks in advance.
# 2  
Old 01-26-2012
Code:
 
while read a
do
/path/of/python /path/of/sidconv.py "$a" >> /path/of/workfile.txt
done < /path/of/workfile3.tmp

This User Gave Thanks to itkamaraj For This Post:
# 3  
Old 01-26-2012
Many thanks. Worked perfectly. Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Solved] CSV to CSV MS-DOS

Hello, I have the following script which converts some data in a CSV file from one format to another. However, I have to convert the CSV (Macintosh) file to CSV or CSV (MS-DOS) first else the script wont work. I do this in Excel. I know it has something to do with the line endings, where CSV... (12 Replies)
Discussion started by: shadyuk
12 Replies

2. UNIX for Dummies Questions & Answers

UNIX/MS-DOs scipt

Is any one who know a good tutorial for Unix bash script and Ms-Dos scipt?? if yes, if is possible to upload it or give me the link??? What is the difference betwwen uvix and ms-dos script?? (1 Reply)
Discussion started by: Tom2
1 Replies

3. Shell Programming and Scripting

Dos-Unix Connectivity

Hi, Is there any method to connect unix box(Excecuting unix commands through Batch Files) through DOS prompt. (1 Reply)
Discussion started by: shekhar_ssm
1 Replies

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

5. SCO

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. (1 Reply)
Discussion started by: shrb78
1 Replies

6. Cybersecurity

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. (1 Reply)
Discussion started by: shrb78
1 Replies

7. UNIX for Dummies Questions & Answers

Unix Emulator for DOS Shell

would like to have ls, wc -l, etc all availble in this silly dos shell I'm stuck in thanks! (1 Reply)
Discussion started by: robersh
1 Replies

8. Shell Programming and Scripting

Dos to Unix conversion

Hi ! I need to convert a DOS batch file to Unix Shell script. Can anybody help me by providing equivalent Unix shell script code to this DOS batch code?. for /F "tokens=2,3,4 delims=/- " %%i in ("%date%") do set DateStamp=%%k%%i%%j Any help would be great. Thanks, John. (1 Reply)
Discussion started by: john413
1 Replies

9. UNIX for Dummies Questions & Answers

DOS to Unix translator

I know nothing of unix and didn't know where to start. I've heard of a DOS to Unix translator, and since I know DOS pretty well, I thought that this program would be perfect. Any help you could give me would be appreciated. Bryan (1 Reply)
Discussion started by: bferguson
1 Replies

10. UNIX for Dummies Questions & Answers

Compressing files from DOS to Unix

As the title sugests I need to compress files from DOS to Unix. The files should be in .Z format, as created using 'compress' in an Unix environment. Ligs (2 Replies)
Discussion started by: ligs
2 Replies
Login or Register to Ask a Question