1lkdaq
Last Updated: February 25, 2016
·
352
· juggler

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