I need to replace all unwanted spaces in all files from the current directory and from directories from the current directory (recursive search).
I define the unwanted spaces the spaces and tabs that are at the end of the line and are not followed by any other character than
\n (the new line character).
This is a line with unwanted spaces // this line is supposed to contain only spaces Another line without unwanted spaces Another line with unwanted spaces
This snippet will become:
This is a line with unwanted spaces Another line without unwanted spaces Another line with unwanted spaces
How can I remove all unwanted spaces from all files (recursive search) from the current directory?