Advanced Sed: Deletion and Filtering
AS
Aman Saurav
7 min read
#linux
#automation
You can use Sed to delete lines that match a pattern.
Delete all lines containing “error”:
sed '/error/d' logfile.txt
Delete lines 5 through 10:
sed '5,10d' file.txt
:::video Sed Deletion Patterns