regex - finding lines that Don't match a given pattern -
i have large file , want print lines not match particular undesired pattern. following exact opposite of want, namely retains undesirable lines.
grep -e '\[0.0, 0.0\]' locscore.txt
how can lines don't have above pattern? tried
grep -e '^*(?!\[0.0, 0.0\])*$' locscore.txt
but produces nothing.
if use grep, there option -v
, need.
from man page:
-v, --invert-match invert sense of matching, select non-matching lines. (-v specified posix.)
Comments
Post a Comment