Are there any tools / UNIX single liners which would remove trailing whitespaces for multiple files in-place.
E.g. one that could be used in the con
exTry using Ex editor (part of Vim):
$ ex +'bufdo!%s/\s\+$//e' -cxa *.*
Note: For recursion (bash4 & zsh), you can use a new globbing option (**/*.*). Enable by shopt -s globstar.
perlfind . -type f -name "*.java" -exec perl -p -i -e "s/[ \t]$//g" {} \;
as per Spring Framework Code Style.
sedFor using sed, check: How to remove trailing whitespaces with sed?
See also: How to remove trailing whitespace of all files recursively?