TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Merging two ini/env keyval files and remove duplicate keys using awk

1 pointsby mattkenefickover 6 years ago

2 comments

mattkenefickover 6 years ago
I ran into this issue today and couldn&#x27;t find a great solution online.<p>Needed to combine multiple key&#x2F;value files, like <i>.ini or </i>.env, and have some values override others while removing duplicates.<p>This script + example demonstrates how to use awk to remove duplicate lines based on their key.
flatfilefanover 6 years ago
What is your expected merged.env content? Lines from which file take precedence? Listing it will help understanding your use case.
评论 #18874437 未加载