Hands-on task
This task is step 15 of the course “Regular expressions”
Collapse spaces
In /root/spaces.txt there are several consecutive spaces in places. Replace any sequence of spaces with a single one and save to /root/single.txt.
What you'll practise:
- sed
- s/// substitution
- + quantifier
- g flag
- regex