CMD script parser

S

Spin

Experts,

I nned a utility that will parse through .txt files and wherever it see a
carriage return it will replace with a semi-colon. So it will turn
something like this:


This is an example line
This is the second line

into this:

This is an example line;This is the second line
 
T

Torgeir Bakken \(MVP\)

Spin said:
Experts,

I nned a utility that will parse through .txt files and wherever it see a
carriage return it will replace with a semi-colon. So it will turn
something like this:


This is an example line
This is the second line

into this:

This is an example line;This is the second line
Hi

You can e.g. use gsar (Unix port) for this.

gsar111.zip, General Search And Replace on files (Documentation & Source)
http://home.online.no/~tjaberg/

or

gsar.exe in the free UnxUtils suite at http://unxutils.sourceforge.net
(in a command prompt, run gsar.exe without any parameters for help screen)
 
T

Torgeir Bakken \(MVP\)

Spin said:
Torgeir will this run on Windows and is easy to use?
Hi

Yes and yes.

This will replace carriage return+line feed with semi-colon
in all .txt files in current folder (I used the gsar.exe in
gsar111.zip):


gsar.exe -s:013:010 -r; -o *.txt


using hex values:

gsar.exe -s:x0d:x0a -r; -o *.txt
 
A

Al Dunbar [MS-MVP]

Spin said:
Torgeir will this run on Windows and is easy to use?

I wouldn't expect Torgeir to suggest a solution in two windows-specific
newsgroups that was not capable of being implemented in windows.

/Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top