Bitwise OR in bash arguments with square brackets

150 Views Asked by At

I'm familiar with using bitwise OR in general programming, like C, as a way to pass flags to a function call. But what does this mean in bash? I'm specifically confused about its use in the grep function:

From the linux manual:

SYNOPSIS
       grep [OPTIONS] PATTERN [FILE...]
       grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]

What exactly does [-e PATTERN | -f FILE] mean?

Also, what does it mean when something is in square brackets?

EDIT: IS there some kind of standard which explains how the linux manual is formatted? I can't find anything about this.

0

There are 0 best solutions below