Hands-on task
This task is step 14 of the course “Regular expressions”
Remove trailing whitespace
In /root/messy.txt some lines have extra spaces at the end. Remove the trailing whitespace on all lines, output to /root/trim.txt.
What you'll practise:
- sed
- s/// substitution
- POSIX classes
- end-of-line anchor
- regex