Xref: utzoo comp.unix.wizards:9711 comp.unix.questions:7896 Path: utzoo!attcan!uunet!husc6!mailrus!ames!oliveb!olivea!andrewl From: andrewl@olivea.olivetti.com (Andrew Law) Newsgroups: comp.unix.wizards,ca.unix,comp.unix.questions Subject: WAS: script,awk,sed question? Keywords: script awk sed unix Message-ID: <24765@oliveb.olivetti.com> Date: 1 Jul 88 22:48:41 GMT Sender: news@oliveb.olivetti.com Lines: 17 Hello, someone out there, I have two files: file a file b with 'string 1' #n with 'string 1' #1 'string 5' #n 'string 2' #2 'string 3' #3 'string 4' #4 'string 5' #5 What I would like to do is to read file a and b. If there is a match on the string in a to a string in b, the #n will be SUBSTITUTED by the appropiate # number from file b. NOTE: 'string' and #n are some arbitrary fields inside each record and cannot be assumed the $1 or $n. field. Any suggestions on how to do with shell scripts, awk or sed. Please help and send mail to andrewl@olivea.olivetti.com Thank you very much.