[SLUG] search and replace

From: Rock (mrock@stewartsigns.com)
Date: Tue Aug 12 2003 - 14:36:17 EDT


I have a data file that is nearly 14,000 lines long. It is a variable
length line. I have need to update this file twice a day with updated
information relative to the first field in this file. It is space
delimited and sorted on the first field. I need to replace the line
with information in an update log which has the same key (first field).
The update file could be as long as a hundred lines.

Is there a straight forward way of doing this?

I was going to do a merge and then sort and then uniq to remove the
duplicates but I was not able to assure that the update file entry was
the first line read in a uniq operation. My tests proved that I could
not control that the latest entry would be the first in the file.

Michael C. Rock
Systems Analyst
Registered Linux User # 287973

"The time has come the walrus said to speak of many things,,"
"Christians give up what they cannot keep to gain what they cannot lose"

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:32:44 EDT