I have list of IP Ranges and i need to create a csv file like below.
Input data
Start IP
192.168.100.1
172.1.1.1
Expected output
192.168.100.1
192.168.101.1
-----
-----
192.168.254.1
Similarly for 172 series I need to generate the data.
172.1.1.1
172.1.2.1
173.1.3.1
----
----
173.1.254.1
I am not that good in excel. So, i thought to generate the data by PowerShell.
i can read the input either by defining it in script or can read the text file.
But i am not sure how to read the 3rd value of IP and increment it.
Anyone has any advise on it. May be some support in Regex.
foreach($line in Get-Content c:\test\ip.txt) {
---- Need some support here.
}
Updated the question for better understanding.