Dos to Unix conversion


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Dos to Unix conversion
# 1  
Old 09-10-2005
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.
# 2  
Old 09-10-2005
DateStamp=$(date %Y%m%d)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

[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: for /f %%a in (C:\STEAMINVITE\extractor\workfile3.tmp) do C:\Python27\Python.exe C:\STEAMINVITE\extractor\sidconv.py %%a >... (2 Replies)
Discussion started by: spinner0205
2 Replies

2. Shell Programming and Scripting

Command for unix to dos conversion

Dear All Could you please advice how do we convert a unix file to dos I know one command,ux2dos, which somehow does not work to give desired output Inputs on this is appreciated Thanks, Suresh (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

3. Programming

windows to dos file name conversion x'ad'

We are running a java client server application on Solaris 10. External Users from around the country attach windows files through a client and these files are stored on a unix server. Recently I've started getting files that have a hex value of ad in their names. This causes a tar command to... (5 Replies)
Discussion started by: gillbates
5 Replies

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

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

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

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

9. UNIX for Dummies Questions & Answers

Unix Equivalents to the following Dos Commands

cd... dir... rem ... type... del... copy... mkdir... rmdir... attrib... And how can I get this information? My email address is ***removed*** By way the 001 are numbers. (3 Replies)
Discussion started by: jaquar85
3 Replies

10. 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
Login or Register to Ask a Question