GNU bug report logs - #37607
How to use Grep with Using -o

Previous Next

Package: grep;

Reported by: Matt Zand <mahdiumd <at> gmail.com>

Date: Thu, 3 Oct 2019 16:09:01 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Matt Zand <mahdiumd <at> gmail.com>
To: 37607 <at> debbugs.gnu.org
Subject: bug#37607: How to use Grep with Using -o
Date: Thu, 3 Oct 2019 11:54:24 -0400
[Message part 1 (text/plain, inline)]
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/>
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.