dump trailing whitespace across a project
After adding Cane to an old crufty project, I found (among other issues) hundreds of reports of 'Line contains trailing whitespace'. After a quick perl onliner, those were all gone.
find . -name '*.rb' -print0 | xargs -0 perl -pi -e 's/[^\S\r\n]+$//'
Written by Mr Rogers
Related protips
1 Response
looks like this could be merged with https://coderwall.com/p/_ppnlg for good time fun
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Perl
Authors
janosgyerik
25.11K
Jean-Remy Duboc
12.22K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#