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

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

Find the longest word in the word list file.


From: Hongyi Zhao
Subject: Find the longest word in the word list file.
Date: Wed, 11 Aug 2021 07:14:05 +0800

I have an English word list file that stores words in a
one-word-per-line format. Now I want to find the longest word in the
word list file. For example, I can use standard UNIX tools to
accomplish this with the following simple commands:

$ awk '$0 ~ /^[[:alpha:]]+$/ { print $0, length($0) }'
american-english-exhaustive | \
sort -k2n | tail -1
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch 58

But in Emacs, what is the elisp implementation for the above task?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



reply via email to

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