## delete trailing whitespace from all lines in file.
## This may effect backslash continuation and here document terminators,
## but it will turn them ON, not off.
## dtw won't get all of spaces mixed with tabs in one pass.
## USAGE:   dtw <file>

ed $1 <<HEREDOC
,s/ *$//
,s/	*$//
wq
HEREDOC