Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Limits on file numbers in sort -m



Jim Breen writes:

 > That's pretty much my understanding of it. It would be ultimate silliness to
 > have read-only input pages end up replicated in swap.

I'm not thinking about swap, I'm counting syscalls, which are quite
expensive in this kind of application.

 > In any case the output from "uniq -c" is not what I want,

That seems strange to me.  When operating on lines of text (by that I
mean *not* having a fixed set of fields as you might in CSV, I don't
know what you had in mind), it makes a *lot* of sense to prefix rather
than suffix a fixed format record, as that can easily be stripped with
cut(1) (or handled with the -f option to utilities like uniq and sort.

 > so since I'd need to reformat it it's easier to use my own
 > utility. It also give me the option of turning
 > 
 > this  3
 > this  4
 > 
 > into
 > 
 > this  7
 > 
 > which I can't do with "uniq -c".

You need the counts?  In that case I guess you do need the special-
purpose tool (although it would be interesting to add it to uniq
itself, this is likely a recurring use case).




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links