4 ms·
BTW I ONLY use egrep and fgrep !!! - egrep means [0-9]+ works like in Perl/Python/JS/PCRE/every language, not [0-9]\+ like GNU grep. - egrep syntax is consist
by chubot 4y ago
BTW I ONLY use egrep and fgrep !!!
- egrep means [0-9]+ works like in Perl/Python/JS/PCRE/every language, not [0-9]\+ like GNU grep.
- egrep syntax is consistent with bash [[ $x =~ $pat ]], awk, and sed –regexp-extended (GNU extension)
- These are POSIX extended regular expressions. Awk uses them too.
- `fgrep` is useful when I want to search for source code containing operators, without worrying about escaping
This style makes regular expressions and grep a lot easier to remember! I want to remember 2 regex syntaxes (shell and every language), not 3 (grep, awk, every language) !
This change should be reverted; there is no point to needless breakage
Again you wouldn’t remove grep –long-flags because it’s not POSIX
- blep_ 4y agoYou may also be interested in `grep -P`, where `P` is short for `Please just use PCRE like everything else in this century`. I don't think any of the others support that though.