Count Unique Elements in Text File with AWK
Counting the distinct/unique elements of text file is a common task. Below is an example of doing this is AWK, using sample_data_1.txt. cat sample_data_1.txt \ | awk 'BEGIN{FS="\t"} NR>1{names[$2]=1} END{print…
0 Comments
January 25, 2021