sed delete lines from file based on string code example
Example 1: sed remove line containing
sed '/pattern to match/d' ./infile
Example 2: delete lines text file linux
sed -i '' '/pattern to match/d' ./infile
sed '/pattern to match/d' ./infile
sed -i '' '/pattern to match/d' ./infile