User Tools

Site Tools


eric:computer:bash:commands:spellcheck

spell check

Modern day version of Brian Kernighan's Unix pipe example from VCF East 2025 (https://www.youtube.com/watch?v=WEb_YL1K1Qg&t=2719s, about 24 minutes in from start).

Searches bible-ylt.txt for words that are not in the dict-infochimp.txt (all lowercase, no numbers) dictionary.

It converts the input text to lowercase, makes it one word per line, sorts it, deletes duplicate words, compares to the lowercase dictionary file.

cat bible-ylt.txt | tr "[:upper:]" "[:lower:]" | tr -cs "[:alpha:]" "\n" | sort | uniq | comm -23i - dict-infochimp.txt 
eric/computer/bash/commands/spellcheck.txt · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki