help-gnu-emacs
[Top][All Lists]
Advanced

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

How to implement line sorting, uniquifying and counting function in emac


From: gnuist006
Subject: How to implement line sorting, uniquifying and counting function in emacs?
Date: 29 Sep 2002 19:13:06 -0700

In shell you can do this:

   cat file | sort | uniq -d | wc 

to count the repeated lines. You can also do

   cat file | sort | uniq -u | wc

to count the unique lines.

Sometimes I have to do this on windows platform where I do have emacs.
This means that I cannot escape to shell and that route is not available.

Lisp has sort-lines, but no uniq -u or uniq -d available. Also I do not
know the equivalent to wc.

This is where some help is requested. I think that this is not only a
problem of lisp programming, but also algorithms. Which group has this
kind of expertise?

Cheers!
gnuist


reply via email to

[Prev in Thread] Current Thread [Next in Thread]