Reputation: 4170
I am new in shell scripting and all questions I found about this was so complicated that I decided to ask the question about the principle of this error. I have a test.sh file which looks like:
var1="I love Suzi Suzi and Marry"
var2="Sara"
echo "${var1//Suzi/$var2}"
if I run it in terminal via sh test.sh I am getting this error - Bad substitution. Can somebody tell me please what is wrong with it? Thank you.
Upvotes: 0
Views: 925