find a better solution for trailing whitespace

tabs can be ok (in bash scripts for example)