webmd-health-services / Carbon

Apache License 2.0
303 stars 45 forks source link

Create Split-HostsFile function #24

Open splatteredbits opened 7 years ago

splatteredbits commented 7 years ago

Imported from Bitbucket issue #48, created on 2015-12-02


Create a function that will parse the hosts file and return objects for each line. Each object should have IPAddress, HostName, Comments properties.

bb-issue-48
splatteredbits commented 7 years ago

Originally created on 2012-09-03

Add answer to http://stackoverflow.com/questions/12187388/how-to-read-a-specific-line-in-a-text-file when finished.

bb-issue-comment-1910706
splatteredbits commented 7 years ago

Originally created on 2012-12-27

Decreasing priority. Current project focus is releasing v1.0. I'm prioritizing all issues that won't be part of the 1.0 released as trivial. They will be re-prioritized after the 1.0 release.

bb-issue-comment-2708037
My-Random-Thoughts commented 4 years ago

Here, I knocked this up in about an hour - most of that was playing around with regex!! :) https://github.com/My-Random-Thoughts/Various-Code/blob/master/Get-HostsFile.ps1