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