Modifying large textfile format / any perl / general coders

Get help on programming - C++, Java, Delphi, etc.
Post Reply
Anthro
Moderator Emeritus
Posts: 5547
Joined: 21 Dec 2002, 02:00
Processor: i7 3770k
Motherboard: ASUS P8P67-Pro
Graphics card: 2xNvidia GTX670
Memory: 16 GB Gskill Sniper
Location: In SQL Space inserting 'null' on purpose
Contact:

Modifying large textfile format / any perl / general coders

Post by Anthro »

Hi there guys, I have a bit of a mammoth task of making my own HOSTS file,,
Now problem is I have it in the following format:

Code: Select all

hostname IP Address
I need those two fields swopped around..
Any perl scripters or guys that use Notepad++ more than me have any ideas to change the text file quicker ?
Much appreciated !! :P
Temporary Absence
Slasher
Registered User
Posts: 7525
Joined: 23 Aug 2003, 02:00
Location: 5th rock from the sun.

Post by Slasher »

What about 'importing' it into excel, defining the column split at the first blank space, then just moving the first column back, and pasting it into the text file again?
My BF2142 Stats:
Image


Slasher : Former member of www.PCFormat.co.za
I have reached the end of my near 5 year forum life. Farewell good days...

slasher (at) webmail (dot) co (dot) za
Anthro
Moderator Emeritus
Posts: 5547
Joined: 21 Dec 2002, 02:00
Processor: i7 3770k
Motherboard: ASUS P8P67-Pro
Graphics card: 2xNvidia GTX670
Memory: 16 GB Gskill Sniper
Location: In SQL Space inserting 'null' on purpose
Contact:

Post by Anthro »

Eish I did it all manually just after creating this.. about 600 lines :x
Thanks for that bright ida though.. will use it in future :P
Temporary Absence
Post Reply