#!/bin/sh word=$1 not=$2 flag=$3 temp=`mktemp` grep -i '^'"$word"'$' /usr/share/dict/words | grep -iv "['$not]" > "$temp" if [ "$flag" = '-l' ]; then cat "$temp" | tr 'A-Z' 'a-z' | sed 's/\(.\)/\1\n/'g | sort | uniq -c | sort -n else cat "$temp" fi rm "$temp"