Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 51 lines (37 sloc) 1.54 KB
#! /bin/sh
#word file is arg $1
iewords=`grep -ic ie .words`
echo "Words with ie: $iewords"
eiwords=`grep -ic ei .words`
echo "Words with ei: $eiwords"
ceiwords=`grep -ic cei .words`
echo "Words that follow 'i before e except after c': $ceiwords"
ciewords=`grep -ic cie .words`
echo "Words that don't follow it: $ciewords"
echo "that's a lot of 'exceptions', what if we take out dupes? No words ending in 'ier', 'iest', 'ed', 'ing' or 's'."
iewords0=`grep -ic ie .wordsNoDupe`
echo "Words with ie: $iewords0"
eiwords0=`grep -ic ei .wordsNoDupe`
echo "Words with ei: $eiwords0"
ceiwords0=`grep -ic cei .wordsNoDupe`
echo "Words that follow 'i before e except after c': $ceiwords0"
ciewords0=`grep -ic cie .wordsNoDupe`
echo "Words that don't follow it: $ciewords0"
echo "ok let's take out proper nouns. No words starting in a cap."
iewords1=`grep -ic ie .wordsNoCaps`
echo "Words with ie: $iewords1"
eiwords1=`grep -ic ei .wordsNoCaps`
echo "Words with ei: $eiwords1"
ceiwords1=`grep -ic cei .wordsNoCaps`
echo "Words that follow 'i before e except after c': $ceiwords1"
ciewords1=`grep -ic cie .wordsNoCaps`
echo "Words that don't follow it: $ciewords1"
echo "there's still some duplicates with hyphenated words. let's take those out:"
iewords2=`grep -ic ie .wordsNoHyphen`
echo "Words with ie: $iewords2"
eiwords2=`grep -ic ei .wordsNoHyphen`
echo "Words with ei: $eiwords2"
ceiwords2=`grep -ic cei .wordsNoHyphen`
echo "Words that follow 'i before e except after c': $ceiwords2"
ciewords2=`grep -ic cie .wordsNoHyphen`
echo "Words that don't follow it: $ciewords2"