GNU bug report logs - #27902
Using -o with -v

Previous Next

Package: grep;

Reported by: Arseny Sher <sher-ars <at> yandex.ru>

Date: Tue, 1 Aug 2017 09:20:02 UTC

Severity: wishlist

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arseny Sher <sher-ars <at> yandex.ru>
To: bug-grep <at> gnu.org
Subject: Using -o with -v
Date: Tue, 01 Aug 2017 12:19:12 +0300
Hi,

Is it possible to output symbols which constitute non-matched
parts of text? For example, 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.

--
Arseny Sher




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

Previous Next


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