echo "Checking echo to see how to suppress newlines..." if (echo "hi\c"; echo " ") | grep c >/dev/null 2>&1 ; then echo "...using -n."; n=-n; c= else cat <$c"; echo '*' fi