Funny how a tiny config change can cause so much trouble. Did you find out what caused the issue?
sed 's/port/listen_port/g' rewrote four lines of a four-line config
2 Comments
BashSnippets
•
@[MightyMeta] Yep, eventually, lol. sed matches characters, not words. The letters p-o-r-t sit inside support, transport and report, and the g flag replaced every one. The fix was a word boundary on both sides, s/\bport\b/listen_port/g, and piping the result through diff app.yml - before putting -i back on. What made it sneaky is that sed -i exits 0 and prints nothing, so nothing tells you four lines changed instead of one.
Please log in to add a comment.
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.
Please log in to comment on this post.
More Posts
- © 2026 Coder Legion
- Feedback / Bug
- Privacy
- About Us
- Contacts
- You Tube
- Tiktok
- Premium Subscription
- Terms of Service
- Early Builders
chevron_left
68Posts
31Comments
10Connections
Linux user who got tired of Googling the same bash commands every time I sat down at a terminal. Sta... Show moreLinux user who got tired of Googling the same bash commands every time I sat down at a terminal. Started writing them down. That turned into bashsnippets.xyz -->
a free and growing library of copy-paste bash scripts with plain-English explanations. No logins, no paywalls, just scripts that work. I post a new one every week on YouTube & TikTok @BashSnippets. Show less
a free and growing library of copy-paste bash scripts with plain-English explanations. No logins, no paywalls, just scripts that work. I post a new one every week on YouTube & TikTok @BashSnippets. Show less
More From BashSnippets
Related Jobs
- Bilingual Retail Sales Associate (Spanish) - VerizonVerizon · Full time · Germany
- Backend Developer Durable APIs & Risk Pipelines (Remote)Ocean Park Asset · Full time · New York, NY
- Data Engineer — Python Pipelines & Data Mesh ArchitectCosmico · Full time · Italian Republic
Commenters (This Week)
Fooj
1 comment
amarachii_e
1 comment
Asta Silva
1 comment
Contribute meaningful comments to climb the leaderboard and earn badges!