This is the question, first I'd like to know if shell scripting could do this, if it can whats the best scripting language to use and any hints you can too. TIA.

The problem I have is this I need to do a lot of search and replaces. But they are kinda different. Let me explain.

Two files, a & b. What I want to do is do a search for "xxx" but the replace is from each consecutive line of file b.

eg file a
peter_xxx
john_xxx
james_xxx

file b
090
070
020

after search and replace...
peter_090
john_070
james_020

I really hope there is a way to do this. Many thanks K