Delete trailing white space (spaces, tabs)

awk

awk '{sub(/[ \t]*$/, "");print}' filename
click the source code to copy install awk on any operating system with command-not-found.com