From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Let ispell use use multiple dictionaries stored in different files. Date: Sun, 8 Aug 2021 13:08:33 +0800 Message-ID: References: <874kc1i72n.fsf@zoho.eu> <87o8a8fuzv.fsf@zoho.eu> <87fsvkft1t.fsf@zoho.eu> <87bl68fs6l.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25104"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 08 07:09:17 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCb3l-0006Md-9d for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Aug 2021 07:09:17 +0200 Original-Received: from localhost ([::1]:34138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCb3j-0007Ti-PJ for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Aug 2021 01:09:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCb3H-0007TH-TH for help-gnu-emacs@gnu.org; Sun, 08 Aug 2021 01:08:47 -0400 Original-Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:35764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCb3G-0003NT-Jo for help-gnu-emacs@gnu.org; Sun, 08 Aug 2021 01:08:47 -0400 Original-Received: by mail-lj1-x235.google.com with SMTP id x9so16573063ljj.2 for ; Sat, 07 Aug 2021 22:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=mLEMRIpS1G+TI9Xeg0olaOXzx+/jiGI4NvCD54xVmkQ=; b=kwYZjW4tV1cQFyr/ofmGxFowYgYXvjc1KiY2LCfQudjBt/AK9NK8sbSjWnmbjmxjxc mXWslMGUbWEUzGj/MLsF73iWCfY8t1i5CU+iyg2MIuma9E2gT5evBv7BAizV4nqI+Bg6 vE+s5EG/UvMuTDMilgodwqhzYxp+57QzY16Z+GKBPPVc1XWPKsN5YkYZjwu51G0wPhGo p4G5BMhosYYYPLT85fdoxvM2nr1wwmjVIwaQBaFJXi1myVI3PBACqeKk//FUyEjCq58s mktjBDXprElqBEqI9ciF8jKKbk+qRYc6X1SK2uL3zt5kzD9iQGx8ujuKk1jPdO4Ic9Mm P+sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=mLEMRIpS1G+TI9Xeg0olaOXzx+/jiGI4NvCD54xVmkQ=; b=cL8OFfvuYkuowa9lmgL6Vl0dyw6vpK56hf25c6m6TRyEnqkVsQdb5lIQgPt9omV2MK vpfw/UpxOB7Yh/M6KIOraWTuprKRHUN6wRSZZ+MeB/M6BghpelYdf2/Ii0HcZHIb1hv/ 1z3aytp8388rkT4cp/HnLJ6bOdaciEaIHLl7n2bMbd6P/UPXzmUMwg8qJnK0ZqC2bScp SNQ5KGFQ8Jc7DlSxiTPm6MT6MdBWjML5TxqKoFhVS0w/UPDiWzQMJkRpRMkqLr1lCSx1 ymmSUAHrdSvPpX3TSFMWo3SNM8QhlmdIEPor4B+Hwv43+/kcANuBLf+v+nG4jalzXr+b Ixng== X-Gm-Message-State: AOAM533z0CfNhU78MkmBhk+WRaUkYLX0yG1d38cBXZIMxg+RF5Xj9oDe 7zq2dsFFN+LLI7y9Vdo4zd/SCQmkkgff5bmx0GY= X-Google-Smtp-Source: ABdhPJxLo5EB3BKFJeY8zcI0FLoqeCgfopKiIOjXeoOqM4VW+AZYjsdU1c+9uzF55uXyiVTuifm5jW0amDeimflhESk= X-Received: by 2002:a2e:8618:: with SMTP id a24mr11175068lji.246.1628399324890; Sat, 07 Aug 2021 22:08:44 -0700 (PDT) In-Reply-To: <87bl68fs6l.fsf@zoho.eu> Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=hongyi.zhao@gmail.com; helo=mail-lj1-x235.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132407 Archived-At: On Sun, Aug 8, 2021 at 12:59 PM Emanuel Berg via Users list for the GNU Emacs text editor 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 Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province