Search for optional patterns with grep OR
Describe optional patterns with grep OR using the vertical bar character
|. By using the
| special character, you can write either-or style patterns. In this lesson we'll look for matches on "grey" or "gray". Like the
? characters, the
| character is part of extended regular expressions with grep, so you'll either need to escape it with a backslash, or use the -E flag.