In my bash script, I am trying to execute the following Linux command:
sed -i "/$data_line/ d" $data_dir
$ data_line is entered by the user and can encode special characters that can slow down the regular expression. How can I avoid all possible special characters in $ data_line before I execute the sed command?
source share