I am trying to understand and read the man page. Yet everyday I find more inconsistent syntax and I would like some clarification to whether I am misunderstanding something.
Within the man page, it specifies the syntax for grep
is grep [OPTIONS] [-e PATTERN]... [-f FILE]... [FILE...]
I got a working example that recursively searches all files within a directory for a keyword.
grep -rnw . -e 'memes
Now this example works, but I find it very inconsistent with the man page. The directory (Which the man page has written as [FILE...]
but specifies the use case for if file == directory in the man page) is located last. Yet in this example it is located after [OPTIONS]
and before [-e PATTERN]...
. Why is this allowed, it does not follow the specified regex fule of using this command?