Find duplicate values in one of the two columns in a text file
问题 I have a text file with two values in each line separated by a space. Now I want to know duplicate values in one of the columns. Is it possible to achieve this using Windows powershell. Given a text file: Apple Fruit Banana Fruit Carrot Vegetable Desired output is: (I want to find duplicates in second column) Fruit 回答1: You could use the Import-CSV cmdlet and specify a whitespace delimiter to easy get access of the second column. Then you can group the objects using the second column and