I'm trying to remove a few lines matching some regex.
curl <url> | sed '/\(foo\|bar\|baz\)/d'
i don't want any of those lines to show that match foo, bar or baz
it stops on foo
if this is easier with awk, i'm ok with that.
I'm trying to remove a few lines matching some regex.
curl <url> | sed '/\(foo\|bar\|baz\)/d'
i don't want any of those lines to show that match foo, bar or baz
it stops on foo
if this is easier with awk, i'm ok with that.
 
    
    try
curl <url> | sed '/foo\|bar\|baz/d'
also see many many close examples here: http://www.theunixschool.com/2012/06/sed-25-examples-to-delete-line-or.html
 
    
    This might work for you (GNU sed):
sed '/foo/{/bar/{/baz/d}}' file
or:
sed '/foo/!b;/bar/!b;/baz/d' file
