I have a file which contain following content.
Hi abcd Hi abc hello hello xyz hello
I want the find out duplicate lines as well as howmany times it is repeteing.My expected output is as below.
2 Hi 3 hello
I have used following command alreay which give me duplicate line come one after the other (i.e Hello Hello it works but Hello hi Hello it didn't work)
uniq -d filename