[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37607: How to use Grep with Using -o
From: |
Paul Eggert |
Subject: |
bug#37607: How to use Grep with Using -o |
Date: |
Thu, 2 Jan 2020 02:00:41 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 10/3/19 8:54 AM, Matt Zand wrote:
> 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.
Unfortunately the -v and -o options don't currently combine in that way. Perhaps
they should, or perhaps another option could be added to do what you want. I'll
mark this as a wishlist item.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#37607: How to use Grep with Using -o,
Paul Eggert <=