Content of test.csv is:
XYZ,IN123
Here is my script:
Var1=IN123
Var2=A&B
sed -i "s/$Var1/$Var2/g" test.csv
This is my simple code to replace the content of test.csv, when the code finds IN123, it will be replaced by A&B.
So expected output is:
XYZ,A&B
But with the above code I am getting:
XYZ,AIN123B
What am I doing wrong?