By reading this question, I have discovered that GNU
grep has a
-X option which expects an argument. Strangely, it is mentioned neither in the man page nor in the info page.
Looking at the source code, there is that comment right in the middle of the
/* -X is deliberately undocumented. */
Looking further, it appears that the
-X matcher option sets the engine used for the regexp,
matcher being one of
perl (as of version 2.25).
Some of those values are strictly identical to existing options (namely
grep -F and
grep -P). On the other hand, the three
awk variants have no corresponding options.
Does someone know what is the actual purpose of this option, especially with one of the
awk regexp engines? Can someone tell me why it is purposely not documented?
-Efor GNU sed which provides compatibility with BSD sed. (I expect
-Eto become documented if POSIX formally adopts it and removed if it doesn't.)
-Xis deliberately undocumented. (His email address is in the changelog if you want to ask him.)