i have one variable e.g.
var1="<envpath>/home/genl/jeenk[path]/OT/</envname>"
and having <envpath>/home/genl/jeenk[path]/OT/</envname> entry in
file.txt
but if i try to change this by using sed command its not changed.
e.g.
sed -i "s|$var1|/home/genk/g" file.txt
what could be the solution to this, to escape [ & ] in var?