How to pass variable as input to sed command instead of file please find the example below. I am trying to use the command but I am not able to pass the variable
test=$(I have shell script here which stores the value in test)
Now I want to read the variable and deletethe lines where I find the value 'xyz'
Command i tried
sed -i /xyz/d “$test”