Page 1 of 1

Modifying large textfile format / any perl / general coders

Posted: 18 Jan 2008, 04:44
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

Posted: 18 Jan 2008, 07:56
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?

Posted: 18 Jan 2008, 07:57
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