For loop with sed

Hi there,
I have 1 file with different 144 lines and 144 files that I want to change with a sed.

What I want to do is to go trough the file with the 144 different lines take the line a replace a certain pattern with said in the first file of the folder where the 144 files are. Take the second line of the file and replace with sed the second file of the folder etc etc.

How is this possible to do this?

Thanks!

give an example...replace by what ????

So the file with 144 lines looks like

010-1234
010-5678
...
...

And the files in the directory look like

AAAAA
117-4567
BBBBBB

or

AAAAAAA
AAA/117-4567
BBBBBBBB

so I what I want to do is run through the file with 144 lines take each line an replace the number in the files in the directory. So at the end the 2 above files will look like

AAAAA
010-1234
BBBBBB
AAAAAAA
AAA/010-5678
BBBBBBBB

In the directory there are 144 files

Hi Sick,

Can u make your query very clear....sorry m not able to understand.

let me make it simple:
if you want to take one by one file and replace some certain strings then ..hope below one might help you...

[/CODE]
directory structure:
ls -lrt|nawk '{print $9}'
FILE1
FILE2
FILE3
FILE4
[/CODE]

for f in `ls -lrt|nawk '{print $9}'`
do
sed -i "s/'string'/'replace'/g" $f
done

Thanks
SHa