I have two files, fileA with a list of name :
AAAAA
BBBBB
CCCCC
DDDDD
and another fileB with another list :
111
222
333
444
and a third fileC with some text :
Hello AAAAA toto BBBBB dear "AAAAA" trird BBBBBB tuizf AAAAA dfdsf CCCCC
So I need to find and replace every pattern of fileA in fileC by fileB pattern. It works ! But i realised that fileC contains words like "AAAAA" and it isn't replace by "111".
I'm doing this but it doesn't seems to work.
#! /bin/bash
while IFS= read -r lineA && IFS= read -r lineB <&3; do
sed -i -e "s/$lineA/$lineB/g" fileC
done <fileA 3<fileB