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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -