SED Command :: UNIX to Windows


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SED Command :: UNIX to Windows
# 8  
Old 01-28-2010
"Native" Windows Batch-Scripts can't do sed, or awk, or grep, or any other kind of proper text processing (or even any other kind). So you can either install a third-party tool like Cygwin (free), MKS Toolkit (Payware), or SFU (gratis), use VBScript (or something similar), or convert your script to Perl and install a Perl interpreter. Cygwin has the advantage of being built from the same sources Linux uses, and even ships with a X11 server.
# 9  
Old 01-28-2010
The trivial "find and replace" which you describe can be achived with MSDOS editor "edlin" on a small simple text file. The "edlin" editor cannot handle long filenames.

http://www.empowermentzone.com/dos_pipe.txt

Because the edlin command sequence contains ctrl/z don't forget to use edlin itself to create the edlin inward redirect command file.

Warning: On my quick test edlin loops if the match string does not exist in the input file !


Overall you'd be better writing a program or getting a modern port of "sed".
# 10  
Old 01-28-2010
you can get unix services for windows too
in fact it is already a component in vista, 7 and server 2008.
interix wikipedia
microsoft
suacommunity.com/
# 11  
Old 01-28-2010
I don't have any experience with it but there's also a Sed for Windows.

Regards
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX command to copy files from Windows to UNIX box

Hi Folks, I have a file name abc.xml in my windows machine at the location c:\ytr\abc.xml which I want to place at the unix box machine inside cde directory.. at the following location that is /opt/app/cde/ now the credentials of unix box are abc345 -->(dummyid) ftyiu88--->(dummy passwd) ... (4 Replies)
Discussion started by: punpun66
4 Replies

2. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

3. Shell Programming and Scripting

Execute unix command from an html page in windows

i have a problem situation, where i have a html file say click.html. i have a button "ls" in that html page. i run this html file in windows....Now say if i click that "ls" button it must connect to the unix server and execute ls and return the results back to html page in windows. can anyone tell... (8 Replies)
Discussion started by: niteesh_!7
8 Replies

4. UNIX for Dummies Questions & Answers

How do you use UNIX commands in the Windows Command Line?

I tried opening the windows command line and typing UNIX commands, but they don't work. It kept saying that it was not recognized as an internal or external command, operable program or batch file. Removed strange sentence with even stranger link I need to use UNIX commands such as 'less',... (9 Replies)
Discussion started by: vlay2
9 Replies

5. AIX

Running unix command from windows? How?

Hello Folks, I have a need to execute certain scripts on a regular basis on a number of (AIX) servers. What I had in mind, is to accomplish this using ssh/rsh, auto login. Initially I developped the script, which can be invoked from one of the AIX servers (by loggin into the first host), and... (4 Replies)
Discussion started by: haroon_a
4 Replies

6. Shell Programming and Scripting

Windows command shell equivalent in Unix

In Windows we use cmd.exe \c as the command SHell What is its equivalent in UNIX ? Thanx for all your help. (10 Replies)
Discussion started by: simonsimon
10 Replies

7. Shell Programming and Scripting

Running windows command from Unix

Hi, Is there any way to invoke a Windows command from Unix ?? For eg: I want to track down a user executing a script and want to send him a message through net send in windows .. I am able to get the user machines ip ... and since I want my message to be popped up in users screen, wud... (4 Replies)
Discussion started by: Sabari Nath S
4 Replies

8. UNIX for Advanced & Expert Users

Running windows command from Unix

-------------------------------------------------------------------------------- Hi, Is there any way to invoke a Windows command from Unix ?? For eg: I want to track down a user executing a script and want to send him a message through net send in windows .. I am able to get the user... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

9. Shell Programming and Scripting

Runnig a Windows command from UNIX

Hi, I need to execute a Windows command from UNIX crontab ( or similar utility). We are evaluating the schedular applications that will easily solve this issue although it will be a while by the time the tool selection happens and I need something to implement this solution in the iterim. ... (1 Reply)
Discussion started by: ashpon
1 Replies

10. UNIX for Dummies Questions & Answers

Running a UNIX command from Windows

Hi I need to run a UNIX command from Visual C++ Windows program. I was thinking of the Windows program generating a dummy file on the UNIX drive. On the UNIX box I could have a simple FORTRAN porogram searching continually for this dummy file and executes the UNIX command when the file... (2 Replies)
Discussion started by: robbiegregg
2 Replies
Login or Register to Ask a Question