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

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

Re: Let ispell use use multiple dictionaries stored in different files.


From: Hongyi Zhao
Subject: Re: Let ispell use use multiple dictionaries stored in different files.
Date: Sun, 8 Aug 2021 13:08:33 +0800

On Sun, Aug 8, 2021 at 12:59 PM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> > Yes, considering that the input word list files have already
> > well sorted in lexicographically order, I just want to
> > delete duplicates and leave the rest in their
> > original order.
>
> Not with two files the end result doesn't get sorted just by
> dropping the duplicates,
>
> $ echo '1\n2\n3\na\nd' > one.txt
> $ echo 'a\nb\nc\n1\n4' > abc.txt
> $ awk '!a[$0]++' one.txt abc.txt
> 1
> 2
> 3
> a
> d
> b
> c
> 4
>
> However ...
>
> $ sort -u one.txt abc.txt
> 1
> 2
> 3
> 4
> a
> b
> c
> d

Thank you for pointing this out. I should switch to your sort method:

$ sort -u /usr/share/dict/american-english-insane
Webster_s_Unabridged_3.txt >
american-english-insane-Webster_s_Unabridged_3

Best 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]