3 ms·
GNU grep doesn't take a value for `-E`, so it interprets this as `grep -i -E -t`, which explains the error. It doesn't have a `-t` option. I don't know of any
by faho 5y ago
GNU grep doesn't take a value for `-E`, so it interprets this as `grep -i -E -t`, which explains the error. It doesn't have a `-t` option.
I don't know of any grep that does take a value for `-E`.
It does support taking a value for `-f`, and it also does support that as the last option in a group:
grep -qf/path/to/file
works, even if path is something like "patterns" (see that "t" in there?).
>So, once again: what is "correct", when it comes to option handling? Your example was grep, but by the examples of other GNU tools, it only does an "approximation".
I believe you're simply mistaken about what options it takes, and which options take values, the parsing seems "correct".
- stephenr 5y agoWelp yep, the folly of -E vs -e (was someone saying one character options are fine?) You're right that grep does support what I intended to try (`grep -iet`).