shell script - Strip trailing whitespace from files - Unix & Linux Stack Exchange
The answer to removing trailing whitespace with sed has most of the answer, but I want sed -i 's/[ \t]*$//' $1 to be able to take arbitrary number of file arguments as a shell script on the command line, including glob arguments. I.e. suppose the scri...