linux grep or , grep and , grep not condition examples

Linux grep conditional;

Grep OR:
1. Use regular, grep -E “[A|B]”;
2. Use -eļ¼Œgrep -e “A” -e “B”;

Grep AND:
Use pipe, grep “A” | grep “B”;

Grep NOT: use grep -v