How to remove trailing spaces at the end of each line in a file on Linux?

Use this script with sed:

cat your_file | sed 's/[[:blank:]]+$//g'

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *