Deutsch English Français Italiano |
<eli$2411150141@qaz.wtf> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!panix!.POSTED.panix5.panix.com!qz!not-for-mail From: Eli the Bearded <*@eli.users.panix.com> Newsgroups: comp.os.linux.misc Subject: Re: The joy of pipes Date: Fri, 15 Nov 2024 06:41:40 -0000 (UTC) Organization: Some absurd concept Message-ID: <eli$2411150141@qaz.wtf> References: <vgns2aqlhq@dont-email.me> <m2ttc9y3d8.queerchen@cmschueller.my-fqdn.de> <eli$2411141855@qaz.wtf> <20241114160907.0000252b@gmail.com> Injection-Date: Fri, 15 Nov 2024 06:41:40 -0000 (UTC) Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5"; logging-data="12586"; mail-complaints-to="abuse@panix.com" User-Agent: Vectrex rn 2.1 (beta) X-Liz: It's actually happened, the entire Internet is a massive game of Redcode X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix X-US-Congress: Moronic Fucks. X-Attribution: EtB XFrom: is a real address Encrypted: double rot-13 Bytes: 2263 Lines: 39 In comp.os.linux.misc, John Ames <commodorejohn@gmail.com> wrote: > Eli the Bearded <*@eli.users.panix.com> wrote: > > Okay, I give up. > > 1. How does that relate to EBCDIC? > (I think it was a topic shift to applications of *nix pipes...?) Traditional Unix "spell", which merely outputs words not recognized without context or even line numbers, is an application of pipes. Roughly like this: --8<---------------cut here---------------start------------->8--- cat ~/.spell.words /usr/dict/words 2>/dev/null | tr A-Z a-z | tr -dc a-z' ' | grep '[a-z]' | SPELLSTEMTOOL | sort -u > $TMPFILE_A < $INPUT_FILE tr -s ' ^I!$&()_+[]{}:l"'\''\\.,?/-' ' ' | tr A-Z a-z | tr -dc a-z' ' | grep '[a-z]' | sort -u > $TMPFILE_B comm -13 $TMPFILE_A $TMPFILE_B --8<---------------cut here---------------end--------------->8--- Where SPELLSTEMTOOL is a heuristic that tries to make "try" into "tries" and related dictionary fixes to compensate for the words file not having all the variants. (These days it is /usr/share/dict/words but also these days traditional spell is hard to find. Gnu spell is different.) Elijah ------ or maybe the stem tool worked on file B in the other direction