How to exclude unique lines from output of sort?
Let's say I'm having the following text:
aa
ab
ax (NOT dupplicated line)
aa
aa
ab
az (NOT dupplicated line)
ay (NOT dupplicated line)
and I want to remove non-duplicate lines from it:
aa
aa
aa
ab
ab
How would I do it using sort
?