The Problem Is The Following...

Any topic that does not fit into the other categories.
Post Reply
Message
Author
User avatar
Happy.Camper2
Posts: 19
Joined: Tue Dec 23, 2014 4:48 pm

The Problem Is The Following...

#1 Post by Happy.Camper2 » Tue May 22, 2018 3:59 am

Hi Everyone,

Problem #1=>
I have a list of IP's I want to add to PeerBlock.
The list only has one set of numbers on each line. I know how to select all and append to EOL so it's not a problem to have x.x.x.x- on every line.
The problem is, after the dash, the first set of numbers has to be repeated so each line will look like x.x.x.x-x.x.x.x
It's very time consuming to do each line individually so how do I automatically add the first set of numbers after the dash
because of course, each line has different IP's and even if it didn't, it's still the same problem.

I've downloaded a few editors and remember I'm not the techiest person in the land but, I'll be hogtied if I can figure out how to solve this problem.

Problem #2=>
I have a list of URL's. e.g.-> myproblem.com/a.b/dklkjkljlkj/ and how do I, after I select all, get rid of all the characters and letters after the com because of course each line is different but, all the lines have a / after the com or net, etc.
I just need the host URL's, nothing else.

I sure would appreciate any help any of you could give me.

Thanks in advance :)

User avatar
__philippe
Posts: 508
Joined: Wed Jun 26, 2013 2:09 am

Re: The Problem Is The Following...

#2 Post by __philippe » Tue May 22, 2018 6:38 am

@Happy.Camper2

#1 - IP addresses list

Way back when in 2005, Robin Keir wrote XIP , a tiny (8K) command line tool designed to extract IP addresses and address ranges from text files.
"This utility...can be very useful for all manner of network related operations including analyzing log files and extracting IP addresses from emails"

Give it a try, it's free... :wink:
http://keir.net/download/xip.zip


#2 - Cutting out trailing text after first "/" character

Try command line:

Code: Select all

C:>cut -d"/" -f1 inputfile > cleanedfile 
The 'cut' tool is included in several "Unix for Windows" utilities packages, such as UnxUtils

Post Reply