As a one-liner: (make sure you keep a copy of file1 around...)
perl -ne "/^([^=]+)/ and $_{$1}=$_; END {print sort values %_}" file1 +file2 > file1
|
---|
In Section
Seekers of Perl Wisdom
As a one-liner: (make sure you keep a copy of file1 around...)
perl -ne "/^([^=]+)/ and $_{$1}=$_; END {print sort values %_}" file1 +file2 > file1
|
---|