CMD script parser

  • Thread starter Thread starter Spin
  • Start date Start date
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
 
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)
 
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
 
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
 
Back
Top