Skip to content

Instantly share code, notes, and snippets.

@Zolomon
Created April 27, 2016 14:08
Show Gist options
  • Save Zolomon/a0d13f4ca7d9b8fc8e36d4a5daad7130 to your computer and use it in GitHub Desktop.
Save Zolomon/a0d13f4ca7d9b8fc8e36d4a5daad7130 to your computer and use it in GitHub Desktop.
Find english and swedish typos in a text file.
#!/usr/bin/bash
echo "Spellchecking $1"
tr -s '[[:punct:]][:space:]]' '\n' < $1 | sort | uniq | \
aspell pipe --encoding utf-8 --lang=sv | sort | uniq | cut -d ' ' -f 2 | sort | uniq | \
aspell pipe --encoding utf-8 --lang=en | sort | uniq | cut -d ' ' -f 2
echo "Spellchecked $1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment