I use the following code to delete a line :
sed -i "0,/$DELETE_THIS/{/$DELETE_THIS/d;}" file.txt
But this code fails if the variable DELETE_THIS
contains special characters, like .
, /
, *
and so on...
Is there a way to tell sed
to ignore all special characters and use them as basic text ?