This is like a master file which has entries in the order which I want.
File 2 looks like this:
wwe
khfgv
jfo
wwe
jhgfd
wwe
wwe
hoaha
hao
lkahe
hoaha
wwe
hao
So I want to parse the second file and count the occurence of each of the entries in the second file. Then I want a third file which has the following: (the number adjacent to each entry is the number of times that entry has occured in the file)
wwe 5
khfgv 1
jfo 1
jhgfd 1
hoaha 2
hao 2
lkahe 1
I tried sort|uniq-c but that reorders the file. Is there an easier way to find unique entries without sorting the file?