Skip to main content
Tweeted twitter.com/#!/StackUnix/status/556769448456364032
added 200 characters in body
Source Link
user90533
user90533

Is there a grep-like utility that will enable me to do grep searches with logic operators. I want to be able to nest and combine the logical constructs freely. For example, such asstuff like this should be possible:

grep (--contains=search_term1term1 ||&& --contains=search_term2term2) || (term1 && --not-contains==search_term3(term3 xor term4)) *

I realize this can be done with vanilla grep and additional bash scripting, but my goal here is to avoid having to do that.

Is there a grep-like utility that will enable me to do grep searches with logic operators, such as:

grep (--contains=search_term1 || --contains=search_term2) && --not-contains==search_term3 *

Is there a grep-like utility that will enable me to do grep searches with logic operators. I want to be able to nest and combine the logical constructs freely. For example, stuff like this should be possible:

grep (term1 && term2) || (term1 && (term3 xor term4)) *

I realize this can be done with vanilla grep and additional bash scripting, but my goal here is to avoid having to do that.

Source Link
user90533
user90533

grep with logic operators

Is there a grep-like utility that will enable me to do grep searches with logic operators, such as:

grep (--contains=search_term1 || --contains=search_term2) && --not-contains==search_term3 *