everything but pattern + neighbors
lejeczek <[email protected]>
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
hi everybody
here is a sed piece of shell script
sed -n -e '/$1/{x;1!p;g;$!N;p;D;}' -e h $2
this is taken from a really nice sort of tips&tricks of a
guy's blog
it prints a pattern + neighbor lines, a preceding and
following one
here is novice kind of question,
if one wants to follow same logic but get everything and NOT
that pattern matched and its neighbour lines
how do you do it chaps?
many thanks