I have a document named names.txt
. I want to write a command that finds the most repeated name and shows me how many times this name has been repeated.In case of a the, it will show a random name of the tied names.
For example:
The names.txt
file includes the names: jason, bob, nick, jason and alice
I want it to show:
2 jason
Please help me guys!