lejeczek
2012-11-25 16:48:37 UTC
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
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