> Perl, yes, and here's how I'd do it:
>
> Read the entire update file into memory. Open the main file and scan it
> in line by line. At each line, compare its "key" to the update file's
> lines (in memory). On a match, output the update line. Else, output the
> original line. Close all the files. Kill the original file, and rename
> the old file to the new file.
>
> The actual code is left as an exercise for the reader. ;-}
Not too bad, assuming the update file is fairly small. Here's my alternative solution - read the main file into a hash keyed by the first field, read in the update data, replacing the old values in the hash, then sort/print.
I'll attach my code, assuming the post doesn't get dumped for an 802B text attachment.
Levi
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:39:24 EDT