Hands-on task
Bulk replacement in configs
The application is moving from port 8080 to 9090. In /etc/app/ there are several .conf files with the line listen 8080 — replace it in all of them with listen 9090, keeping backup copies alongside with the .bak extension (with the original content). The /etc/app directory is open in the Editor tab above the terminal — it's handy for comparing the configs and their copies before and after the replacement (do the replacement itself with sed).
- sed
- stream editing
- s/// substitution
- in-place editing
- glob patterns