Quote:
Originally Posted by tostay2003
I mean by using single egrep... looks like logical OR is working
Code:
egrep "Word1|Word2"
, but not logical AND.
Similarly also looking for grep command as well
|
Please see my edit.
grep uses regexes, not logical statements. Regexes give you some logical options, but those options are to express alternatives in a pattern. "And" is implied unless "|" is used, but what you're talking about is parallel analysis rather than a single expression, though it can be made to work in this simple example.
ta0kira
PS Note that "|" itself is
"xor", meaning that a position is filled by one or the other, but not both. If you use "*" or "+", you just denote repetition of the previous statement, which is entirely arbitrary.