sed delete line matching variable code example
Example: sed delete line with match
Use d option at the end of sed command string for deleting line of matches.
sed -i "" "s/matching_pattern/d" file.txt
Use d option at the end of sed command string for deleting line of matches.
sed -i "" "s/matching_pattern/d" file.txt