Originally Posted by Advice Pro
$ cat input.txt | sed 's/[ \t]*$//' > output.txt
You don't need the cat there
$ sed 's/[ \t]*$//' input.txt > output.txt
What crts means by 'windows files' is plain text files that were created in a Windows application and hence have Windows style line endings (CR followed by LF) rather than Unix style (LF only).
If you don't want to alter input.txt you can pipe it to dos2unix and pipe the output from dos2unix to sed.
$ cat input.txt | dos2unix | sed 's/[ \t]*$//' > output.txt
Feels like there should be a way to do that without that cat...
If you're still having trouble you could post input.txt as an attachment for people to experiment with.