Suppose I have one file A which is a list with a two-digit key numbers and three-digit subject numbers. Now suppose I have a second file B containing a list of pairs of subject numbers. I want to substitute in key numbers for pair numbers in file B.
My question is, what is the right UNIX tool for this substitution list job? Can it be elegantly done with tr? How about sed? Examples of the right solution are (of course) welcome.