1. functions 2 3injectfrom() { injectlines "${1}From somebody" "Subject: test1" "To: nowhere"; } 4 5for lead in '' '>' 6do 7 echo "Checking that inject ignores a leading \"${lead}From \" line" 8 injectfrom "$lead" | egrep -qv '^>?From ' 9 injectfrom "$lead" | head -n 1 | grep -q '^Subject:' 10done 11