Monday, June 16, 2008

Removing trailing whitespaces

Removing white spaces entirely from a large file can always be a pain.
Here is a simple sed command (inside vim ) that removes it in one shot

:%s/[ ^I]*$//g

NOTE: The ^I is a special character, and is generated by pressing the TAB key

No comments: