Remove trailing whitespace with sed -i 's/[ \t]*$//' *R