How can I print only those lines that appear exactly once in a file? E.g., given this file:
mountain
forest
mountain
eagle
The output would be this, because the line mountain
appears twice:
forest
eagle
- The lines can be sorted, if necessary.