Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.lang.lisp,comp.lang.scheme Subject: Re: From JoyceUlysses.txt -- words occurring exactly once Date: Thu, 30 May 2024 23:20:08 -0000 (UTC) Organization: A noiseless patient Spider Lines: 13 Message-ID: <20240530161942.627@kylheku.com> References: Injection-Date: Fri, 31 May 2024 01:20:09 +0200 (CEST) Injection-Info: dont-email.me; posting-host="be4518a799bc3fa2f27a0cf115882681"; logging-data="2000837"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tlvOgMVDcb6/vcMwlumovD8/f6o3wWqU=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:z2cg8LeT5K4OV72kmtZ1fzOQHAo= Bytes: 1447 On 2024-05-30, Stefan Monnier wrote: >> Given a text file of a novel (JoyceUlysses.txt) ... >> could someone give me a pretty fast (and simple) program that'd give me >> a list of all words occurring exactly once? > > tr ' .;:,?!' '\n' | sort | uniq -u Yep, that's pretty much how Doug McIlroy famously shut down Knuth. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca