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.
-E
is not quite equivalent to&&
due to the fact that it is order-sensitive – iruvar Jan 05 '15 at 13:58grep foo | grep bar
is a more general way to do AND. – Kenster Jan 05 '15 at 15:43