--
Regarding EREs having leading repetition operators, e.g. '*xyz':
Section 9.5.3 of
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
supplies the grammar for POSIX-conforming EREs. From the notes at the very
bottom:
--
On 09/28/2013 11:52 AM, Glenn Golden wrote:
> * One or more ERE_dupl_symbols appearing first in an ERE, or [ ... ]
>
> Implementations are permitted to extend the language to allow these.
> Conforming applications cannot use such constructs.
POSIX does not require implementations
On Thu, Sep 26, 2013 at 5:21 AM, Holger Then wrote:
> If grep searches through a line that is longer than
> INT_MAX (= 2147483647) characters, then grep causes
...
> $ tail -c 2147483647 grep_bug.txt | grep -e 1 | wc
> 1 8385663 2147483647
> $ tail -c 2147483648 grep_bug.txt | grep -e 1 | wc