I ran into this issue today and couldn't find a great solution online.<p>Needed to combine multiple key/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.