How to add \ in front of $ in a script with vi?

Please help to provide command in vi to add \ in front of $ so it does not interpret next character.

rm interfaces/DART/WEB-INF/classes/DART/util/TotalDisconnectUtil$1.class
rm interfaces/DART/WEB-INF/classes/DART/util/TotalDisconnectUtil$2.class
rm interfaces/RRIF/WEB-INF/classes/RRIF/util/Circuit$Sect.class

i would like to add \ in front of $ like below in vi

rm interfaces/DART/WEB-INF/classes/DART/util/TotalDisconnectUtil\$1.class
rm interfaces/DART/WEB-INF/classes/DART/util/TotalDisconnectUtil\$2.class
rm interfaces/RRIF/WEB-INF/classes/RRIF/util/Circuit\$Sect.class

Hi,
this should do the trick:

:1,$s/\$/\\\$/g

Please use code tags as required by forum rules!

Where (and why) do you need those escaped $ s? What do you want to achieve? There might be easier/better suited ways to get at it if we knew the entire picture.
For just your question, try

sed 's/\$/\\\$/' file
rm interfaces/DART/WEB-INF/classes/DART/util/TotalDisconnectUtil\$1.class
rm interfaces/DART/WEB-INF/classes/DART/util/TotalDisconnectUtil\$2.class
rm interfaces/RRIF/WEB-INF/classes/RRIF/util/Circuit\$Sect.class

Cero, thank you so much for quick response, Yes. it worked.