Hi,

I have a long list of string (each string is in a line). I need to
count the number of appearance for each string.

I currently use `sort` to sort the list and then use another program
to do the count. The second program doing the count needs only a small
amount of the memory as the input is sorted.

But `sort` writes a lot of temp files like `sortjISjDY`, which are
very large. Because I only need the count, ideally, I'd like these
temp files only keep the count info and the original string once, but
not the original string many times. Does anybody know any better way
to make the sort and count run more efficiently?

-- 
Regards,
Peng

Reply via email to