#!/bin/bash f=ftypes.hs f=$1 echo Looking for double quotes, apostrophes, and decimal digits.. grep \[\'\"0-9\] $f && failed1=1 echo "Looking for true|false|::|fst|snd|@|where|let|do|case" egrep -i "true|false|::|fst|snd|@|where|let|do|case" $f && failed2=1 echo "Looking for imports other than Data.Char" grep -i import $f | grep -v Data.*Char && failed3=1 #grep -P "^[^\s]+" $f if [ -z "$failed1$failed2$failed3" ] then #echo 0 exit 0 else #echo 1 exit 1 fi