wsclean is a very simple POSIX shell script that cleans up whitespace from files. It's optimized to work on C-like code, where leading whitespace is used for indentation, but isn't significant (unlike Python or YAML).
Clean your files! Save bytes!
wsclean deletes all trailing whitespace characters that are found immediately before a newline character in files. This is very useful to remove two kinds of unnecessary whitespace that may accidentally be left over in code:
wsclean accepts this syntax:
$ wsclean [-d] file [...]
By default, wsclean overwrites the files it's told to clean. This behavior can be deactivated by using the -d option: when using -d, wsclean will create a new clean file with the suffix .new attached to the original filename.
wsclean is published under an MIT/X11/Expat-type License. See
for copyright and license details.