bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37607: How to use Grep with Using -o


From: Matt Zand
Subject: bug#37607: How to use Grep with Using -o
Date: Thu, 3 Oct 2019 11:54:24 -0400

Hi,

Is it possible to output symbols which constitute non-matched parts of
text? For instance, I expect

printf "banana\napple" | grep --invert-match --only-matching 'ban'

to produce

ana
apple

or

apple

, but it doesn't produce anything.

I need -o because I grep multiline pattern with -z.




-- 
Cheers,

Matt Zand
Cell: 202-420-9192
Work: 240-200-6131
High School Technology Services <https://myhsts.org/>
DC Web Makers <https://dcwebmakers.com/>
Coding Bootcamps <https://coding-bootcamps.com/>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]