I tried tr first. I can only get it to change one
character into another, but i couldn't get it to
change a string to a character. I was trying
stuff like the below. tr man page only says stuff
about changing single characters into single
tr '\015\012' '\012' < $1 > $1.tmp.$$
what i did yesterday for lack of a better way, was to
use tr to change the newlines and carriage returns
to Capital Z's. Then i opened a text editor and
search and replaced each instance of ZZZZ with
a ~, then search and replaced each ZZ with a space.
then i used tr and converted each ~ to a new line.
Every couple of years i end up trying to do something
like this, and can't find a good way, short of writing
a little c program, which i do so rarely, i have to
relearn every time.
Last edited by whansard; 01-10-2003 at 06:55 AM.