PC Review


Reply
Thread Tools Rate Thread

CMD script parser

 
 
Spin
Guest
Posts: n/a
 
      27th Oct 2004
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


 
Reply With Quote
 
 
 
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
      27th Oct 2004
Spin wrote:

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


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scr...r/default.mspx
 
Reply With Quote
 
Spin
Guest
Posts: n/a
 
      27th Oct 2004
Torgeir will this run on Windows and is easy to use?

"Torgeir Bakken (MVP)" <Torgeir.Bakken-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Spin wrote:
>
> > 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)
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scr...r/default.mspx



 
Reply With Quote
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
      27th Oct 2004
Spin wrote:

> "Torgeir Bakken (MVP)" <Torgeir.Bakken-(E-Mail Removed)> wrote:
>
>>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)

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



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scr...r/default.mspx
 
Reply With Quote
 
Al Dunbar [MS-MVP]
Guest
Posts: n/a
 
      28th Oct 2004

"Spin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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

> "Torgeir Bakken (MVP)" <Torgeir.Bakken-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Spin wrote:
> >
> > > 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)
> >
> >
> > --
> > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> > Administration scripting examples and an ONLINE version of
> > the 1328 page Scripting Guide:
> > http://www.microsoft.com/technet/scr...r/default.mspx

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for a T-SQL Parser for .NET google@eduard-ralph.de Microsoft Dot NET 15 20th Apr 2006 08:14 AM
BUG: Script blocking strips script parameters during script authorization Jonathan K. Shay Spyware Announcements 3 2nd May 2005 06:18 PM
Log parser 2.2 =?Utf-8?B?c2hvaXM=?= Windows XP Security 1 20th Jan 2005 11:38 AM
Re: Same XML/XSLT doesn't transform the same - IE6 parser vs. .NET framework parser Peter Row Microsoft Dot NET 0 24th May 2004 09:25 AM
Re: Same XML/XSLT doesn't transform the same - IE6 parser vs. .NETframework parser Oleg Tkachenko [MVP] Microsoft Dot NET 1 30th Apr 2004 08:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:46 PM.