#!/bin/sh

cd r/12dicts

cat 6of12.txt | grep '[.:]' | grep -v "[ /-']" | tr -d '\r:=+^&#<' >> abbreviations.lst
cat 6of12.txt | tr -d '\r=+^&#<' | grep '^[A-Z][A-Z]*$'            >> abbreviations.lst
sort abbreviations.lst -o abbreviations.lst

cat 6of12.txt | grep -v '[#<& /-]'           | tr -d '\r:=+^' | grep -v "^'" | sort > english.lst
cat 6of12.txt | grep '[#<]' | grep -v '[ -]' | tr -d '\r:#<'  | grep -v "^'" | sort > variant.lst
cat 6of12.txt | grep '&' | grep -v '[ -]'    | tr -d '\r:&'   | grep -v "^'" | sort > non-american.lst

cat *.lst | sort | uniq > all.lst

comm -23 all.lst abbreviations.lst > not-abbreviations.lst


