help with finding & replacing pattern in a file

Hi everyone.
Could u be so kind and help me with on "simple" shell script?

  1. i need to search a file line by line for a pattern.

example of a lines in that file

2947 domain = feD,id = 00 0A 02 48 17 1E 1D 39 DE 00 0E 00,Name
Values:snNo = f10
Add AttFlag = 0

  1. i need to find pattern after string feD,id = .... ,
    => 00 0A 02 48 17 1E 1D 39 DE 00 0E 00
  2. if found, i need to pass that value to one function,
    which returns another value, that i'd like to replace with the original one.
    => function returns 36636361 and the line will looks like :
    2947 domain = feD,id = 36636361,Name

Thanks for any help