unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to implement line sorting, uniquifying and counting function in emacs?
@ 2002-09-30  2:13 gnuist006
  2002-09-30  5:15 ` Evgeny Roubinchtein
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gnuist006 @ 2002-09-30  2:13 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-10-01  8:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-30  2:13 How to implement line sorting, uniquifying and counting function in emacs? gnuist006
2002-09-30  5:15 ` Evgeny Roubinchtein
2002-09-30  5:23 ` Evgeny Roubinchtein
2002-09-30  7:04 ` Marc Spitzer
2002-09-30  8:12 ` Jens Schmidt
2002-09-30 16:14 ` Kaz Kylheku
2002-10-01  8:00 ` Steven M. Haflich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).