sed line 1

sed line

Use d option at the end of sed replace definition for deleting line of matches.
sed -i "" "s/matching_pattern/d" file.txt

Here is what the above code is Doing:
1. The -i “” option tells sed to edit the file in place.
2. The s/matching_pattern/d option tells sed to delete the line that matches the pattern.
3. The file.txt option tells sed to edit the file.txt file.

Similar Posts