Solutions to HW 2 ------------------ 1. egrep -n "[[:space:]][A-Z]{2}[[:space:]]" sample.txt 2. egrep -n "[A-Z][a-z]+, [A-Z][A-Z]" sample.txt 3. egrep -n "[A-Za-z]+ [0-9]{4}[^0-9]" sample.txt 4. egrep -n '\$ *[0-9]+\.[0-9][0-9]' sample.txt (notice that here we use single quotes to prevent the shell from interpreting the $ sign!) 5. egrep -n "(Mr\.|Mrs\.|Ms\.|Dr\.) [A-Za-z]+ ([A-Za-z]\. )?[A-Za-z]{11}" sample.txt 6. egrep -n "[a-z]\. *[a-z]|^[a-z]" sample.txt 7. egrep -n "^$" sample.txt