good solutions all, however i am running into a problem.
This is a sample text file:
blablablabla
blablablabla
When viewed in DOS it looks like this:
blablablabla{space}
blablablabla
and in vi:
blablablabla^M
blablablabla
If I do a cat file | tr -d '^M' > new file
It looks good in vi, but in DOS looks like this:
blablablabla{space and a small square}blablablabla
I want to strip the last space when viewed in DOS, so that the end result is:
blablablabla
blablablabla
Any ideas?