While using the command “sed” for find and replace, I wanted to know how one could find a constant and replace it with a variable inside the quotation syntax of sed?
I wanted to replace constant 3 with variable name “hourid”
Here is what I tried.
sed -i 's@3@hourid$@g' file_name.txt
I want to know how to provide a right syntax for replacing variable “hourid”
Your suggestions are greatly appreciated