On Wed, Mar 15, 2017 at 12:17 PM, Jan Stary <[email protected]> wrote: > Apparently, grep can be called with both -E and -F: > > $ printf "foo\nbar\n" | grep -EF '(foo|bar)' > $ printf "foo\nbar\n" | grep -FE '(foo|bar)' > foo > bar > > and the same happens with egrep and fgrep. Indeed, .. > Should grep (or egrep or fgrep) protest > if both -E and -F (or -F or -E, respectively) > are specified? (IMHO not, but anyway?)
Seems unnecessary. Standardese: POSIX doesn't specify that they are exclusive options or that they override each other, so the behavior when they are used together is simply undefined by the standard...which makes any behavior, including using the last, legal. Philip Guenther

