I have a file with a lots of names etc. and with spaces in between. Now, I want to delete all trailing spaces and all empty lines in this file with sed.
I have two commands for this task but I would like to have a combination of both:
sed -i's/\s*$//g' sed -i'/^$/d'