[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:19:45 +0800 |
On Sun, Aug 8, 2021 at 1:08 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> 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
According to the discussion here [1], maybe the following is better:
$ LC_ALL=C sort -u /usr/share/dict/american-english-insane
Webster_s_Unabridged_3.txt >
american-english-insane-Webster_s_Unabridged_3
[1] https://superuser.com/questions/631402/sort-lexicographically-in-bash
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
- Re: Let ispell use use multiple dictionaries stored in different files., (continued)
- Re: Let ispell use use multiple dictionaries stored in different files., Emanuel Berg, 2021/08/07
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Emanuel Berg, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Emanuel Berg, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files.,
Hongyi Zhao <=
- Re: Let ispell use use multiple dictionaries stored in different files., Emanuel Berg, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Emanuel Berg, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Emanuel Berg, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Emanuel Berg, 2021/08/08
- Re: Let ispell use use multiple dictionaries stored in different files., Hongyi Zhao, 2021/08/08