number of different lines in a file

P

Paul McGuire

Kaz Kylheku said:
Paddy wrote:
...if you are lucky enough to have a "zero copy"
pipe implementation whcih allows data to go from the writer's buffer
directly to the reader's one without intermediate kernel buffering.

I love it when you talk dirty... :)

-- Paul
 
P

Paul McGuire

Grant Edwards said:
Because uniq only removes _adjacent_ identical lines.

Thanks, guess my *nix ignorance is showing (this doesn't sound very "uniq"
to me, tho).

-- Paul
 
P

Paddy

Hi Kaz,
The 'Unix way' is to have lots of small utilities that do one thing
well, then connect them via pipes. It could be that the optimised sort
algorithm is hampered if it has to remove duplicates too, or that the
maintainers want to draw a line on added functionality.

Personally, 95%* of the time that I want to use uniq, I also want to
sort any input. and 70% of the time, I also want to do 'wc -l' on the
uniq lines found. Sort, on the other hand, I regularly use without
uniq. Should I therefore want uniq to have a sort and wc functionality
added?
Not for me thanks. I like pipes. I agree with the targetted
funtionality of the 'core' utilities like sort, and search for other
solutions e.g. scripting when life gets more complex.

- Pad.

Unix pipes. You too can do parallel processing on that quad opteron
server :)

* All peacentages shown is accrutt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top