unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Emanuel Berg <moasenwood@zoho.eu>,
	help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Let ispell use use multiple dictionaries stored in different files.
Date: Sun, 8 Aug 2021 13:19:45 +0800	[thread overview]
Message-ID: <CAGP6POLVHz7F9k8vi6wqarvew2N3+X7Oxckz6tvRoH9GHWTL_g@mail.gmail.com> (raw)
In-Reply-To: <CAGP6POJ2TYacNN-osAzrAwX-2QK6MZr8rjMgZEXimTZTmk8H_Q@mail.gmail.com>

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



  reply	other threads:[~2021-08-08  5:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 12:20 Let ispell use use multiple dictionaries stored in different files Hongyi Zhao
2021-08-07 12:41 ` Eli Zaretskii
2021-08-07 13:46   ` Hongyi Zhao
2021-08-07 14:03     ` Eli Zaretskii
2021-08-07 15:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  3:10   ` Hongyi Zhao
2021-08-08  3:35     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  4:03       ` Hongyi Zhao
2021-08-08  4:09         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  4:22           ` Hongyi Zhao
2021-08-08  3:58     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  4:16       ` Hongyi Zhao
2021-08-08  4:40         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  4:52           ` Hongyi Zhao
2021-08-08  4:58             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  5:08               ` Hongyi Zhao
2021-08-08  5:19                 ` Hongyi Zhao [this message]
2021-08-08  6:53                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  7:14                     ` Hongyi Zhao
2021-08-08  7:22                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  7:43                         ` Hongyi Zhao
2021-08-08  7:51                           ` Hongyi Zhao
2021-08-08  8:02                             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08  8:27                               ` Hongyi Zhao
2021-08-08  8:37                                 ` Hongyi Zhao
2021-08-08 10:14                                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-08 13:09                                     ` Hongyi Zhao
2021-08-08 16:27                                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-09  0:06                                         ` Hongyi Zhao
2021-08-09  0:34                                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-09  1:31                                             ` Hongyi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGP6POLVHz7F9k8vi6wqarvew2N3+X7Oxckz6tvRoH9GHWTL_g@mail.gmail.com \
    --to=hongyi.zhao@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).