I got two *.csv files. The first contains this
IP, MAC, Name, Comment 10.10.122.1, 66-55-44-33-22-11, testuser1, this is testuser 1 10.10.122.100, 66-55-44-33-22-12, testuser2, this is testuser 2 10.10.122.2, 66-55-44-33-22-13, testuser3, this is testuser 3 10.10.122.4, 66-55-44-33-22-14, testuser4, this is testuser 4 10.10.122.203, 66-55-44-33-22-15, testuser5, this is testuser 5
The second one contains the sorted list of the IPs. This was a little bit tricky 'cause you had to add leading zeros for sorting the IPs and then you need to remove the leading zeros. So the file looks like this:
10.10.122.1 10.10.122.2 10.10.122.4 10.10.122.100 10.10.122.203
How can I get the other attributes e.g. like the suitable MACS for the IPs in the second csv file?
I tried to use where-object but unfortunately I don't know how to compare the IPs and then to link the other attributes for the correct IPs.