Happy new year to everyone .
I have to be honest , you guys will read much more questions with sed doubts i have .
SED for me is the most complicated tool ever existed in linux , the author could build sed less complicated , but like in everything , they tend to complicate everything .
I have a doubt in searching an exact string in a text and replace it with a variable .
I need to search for an exact string and replace it with a variable
some text with anything there and the word "var1" that i want to replace
Code:
a1="whatever"
sed "s/\<var1\>/$a1/g" < inputfile > outputfile
eventually , this sed code does not work with the variable as the output string to be written .
How to solve it ?