Isso funciona para mim:
while read line
do
i=$(echo $line | cut -d\| -f1 )
f=$(echo $line | cut -d\| -f2 )
case $f in
D) sed -i /^$i/d File1.txt ;;
C) sed -i s/^$i.*/$line/ File1.txt ;;
A) echo $line >> File1.txt;;
esac
done < File2.txt