Skip to content

Instantly share code, notes, and snippets.

@nickserv
Created January 5, 2014 08:26
Show Gist options
  • Save nickserv/8265819 to your computer and use it in GitHub Desktop.
Save nickserv/8265819 to your computer and use it in GitHub Desktop.
Simple spellchecker as a shell script
#!/bin/bash
# See the original at http://www.usrsb.in/The-First-Spellchecker--In-6-Lines-.html
checked_file=$1
dictionary_file=/usr/share/dict/cracklib-small
cat $file_to_check |
tr A-Z a-z |
tr -c a-z '\n' |
sort |
uniq |
comm -13 $dictionary_file -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment