tomdagliusa
Programmer
The grep man page states: Two regular expressions may be joined by the infix operator |; the resulting regular expression matches any string matching either subexpression.
I searched this site and didn't find anything, nor could I understand how to use, or what is the infix operator | (which to me just looks like an or). SO, let's say I have some command which works: someCommand | grep "Server"
and that gives me the lines with "Server" in them.
I can also do: someCommand | grep "\-pc"
and that gives me the lines with -pc in them.
How do I OR the two together, i.e. this infix thingy?
Thanks,
Tom
I searched this site and didn't find anything, nor could I understand how to use, or what is the infix operator | (which to me just looks like an or). SO, let's say I have some command which works: someCommand | grep "Server"
and that gives me the lines with "Server" in them.
I can also do: someCommand | grep "\-pc"
and that gives me the lines with -pc in them.
How do I OR the two together, i.e. this infix thingy?
Thanks,
Tom