remove trailing whitespaces
find app lib spec -iname '*.rb' -or -iname '*.erb' | while read line
do
sed -i '' -E 's/[[:space:]]*$//' $line
expand -t 2 $line > $line.new
mv $line.new $line
done
Written by Max Prokopiev
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Related Tags
#shell
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#