Hands-on task
This task is step 3 of the course “sed: the stream editor”
sed: collapse an aligned table
/root/ports.txt is a port table from a report: the columns are aligned with spaces, several of them between values. The import needs exactly one space between columns — replace every run of spaces with one and save it to /root/ports.single.txt.
What you'll practise:
- sed -E
- + quantifier
- g flag
- collapsing repeats