+# takes out the first few carriage returns that are in the input.
+function squash_first_few_crs()
+{
+ i=0
+ while read line; do
+ i=$((i+1))
+ if [ $i -le 3 ]; then
+ echo -n "$line "
+ else
+ echo $line
+ fi
+ done
+ if [ $i -le 3 ]; then
+ # if we're still squashing eols, make sure we don't leave them hanging.
+ echo
+ fi
+}
+