mv $1 $1.old

cat $1.old |
#Clear out all (and extraneous) new lines
tr -d '\012'  |\

#Squash blanks
tr -s '\040' '\040' |\

#Put in new lines to replace $
tr '\044' '\012' |\

#Remove blanks after E
sed "s/E /E/g"  |\

#Put in $ at end of each line
sed "s/$/\$/" >$1

