Adding a word into a file.

Dear friends,
I am facing a problem with a flat file, to solve that file i need to add certain character in the file which I am not able to do because of "$" sign in the pattern.

Situation is as follows.
Flat file has word RMM$CART
I want to reple this word by RMM$CART DFD

The dollar "$" sign is creating problem.

Kindly suggest me the solution.
Thank you in advance

Anushree

Sure. Please post , what you have tried.

Hi dear,
Thak you for showing your interest.
Following two things I have tried.

find . -name "BMEZINE_TATTOOS" -print -exec sed "s/\RMM$CART/RMM$CART DFD/g;" {} \; > BMEZINE_TATTOOS_DFD

find . -name "BMEZINE_TATTOOS" -print -exec perl -pi -e "s/RMM$CART/RMM$CART DFD/g;" {} \;

Try this...

sed 's/RMM$CART/RMM$CART DFD/g' 

you need to escape the $ symbol since it has a special meaning in Perl and sed:

find . -name "BMEZINE_TATTOOS" -print -exec perl -pi -e "s/RMM\$CART/RMM\$CART DFD/g;" {} \;

find . -name "BMEZINE_TATTOOS" -print -exec sed "s/RMM\$CART/RMM\$CART DFD/g;" {} \; > BMEZINE_TATTOOS_DFD