|
From: | Paul Eggert |
Subject: | bug#37754: wish for grep --and -eX -eY -eZ (X∩Y∩Z intersection, not X∪Y∪Z union) |
Date: | Wed, 16 Oct 2019 11:57:31 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
Assuming concatenation has higher precedence than \&, the requested behavior could be achieved via:
grep '.*X.*\&.*Y.*\&.*Z.*'This approach would allow intersection to be nested inside other operations. Also, it would clarify how other features work. For example, grep -o has clear semantics with this approach, whereas the semantics of grep -o are not so clear with the proposed --and option.
[Prev in Thread] | Current Thread | [Next in Thread] |