Find duplicated column value in CSV

Using AWK:

awk -F, 'data[$1] && !output[$1] { print data[$1]; output[$1] = 1 }; output[$1]; { data[$1] = $0 }'

This looks at every line, and behaves as follows:

  • if we’ve seen the value in the first column already, note that we should output any line matching that, and output the memorised line;
  • output the current line if its first column matches one we want to output;
  • store the current line keyed on the first column.

If all of your IDs ae the same length (8 characters in your example), you can do the whole thing using sort and GNU uniq:

$ sort file | uniq -Dw 8
11111111,high,6/3/2019
11111111,low,5/3/2019
11111111,medium,7/3/2019

If they aren't the same length, you can still use this approach but it gets a bit more complicated:

$ tr ',' ' ' < file | sort  | rev | uniq -f2 -D | rev | tr ' ' ','
11111111,high,6/3/2019
11111111,low,5/3/2019
11111111,medium,7/3/2019