regex - grep using regular expression "and" -
how filter out line contains both canvasbench
, tracing_mark_write
following sentence shown?
canvasbench-16333 [003] ...1 87432.398788: tracing_mark_write: b|16333|performtraversals\n\
there no , operator in grep. but, can simulate , using grep -e option.
grep -e 'canvasbench.*tracing_mark_write|tracing_mark_write.*canvasbench' filename
and alternatively, can use multiple grep command separated pipe simulate and.
grep -e 'canvasbench' filename | grep -e 'tracing_mark_write'
Comments
Post a Comment