Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Parsing column in csv file

$
0
0

I haver a csv file with a column containing host names. Occasionally the host name is shown as a FQDN and I need to remove the domain part ie '.me.co.uk' for those entries. The data comes from different domains so the domain is not always the same. How do i parse the column? example below

hostname1

hostname 2

hostname3.domain.co.uk

hostname4


Viewing all articles
Browse latest Browse all 10624

Trending Articles