in reply to
Unbelievably Obvious Debugging Tip
Before everyone starts modifying their programs, modifying all their print statements, I'd like to point old and trusty cat. Everyone knows cat. Not everyone knows its options. -E is very useful in this regard: it makes cat print a $ at the end of each line. Other useful cat options for debugging output: -T which displays tabs as ^I, and -v which will show non-printable and non-ASCII characters using ^ and M- notation. With some versions of cat,
cat -vET can also be written as cat -A.
cat is your friend. Never debug without it!