sed: Limitations
1
1 8 GNU 'sed''s Limitations and Non-limitations
1 *********************************************
1
1 For those who want to write portable 'sed' scripts, be aware that some
1 implementations have been known to limit line lengths (for the pattern
1 and hold spaces) to be no more than 4000 bytes. The POSIX standard
1 specifies that conforming 'sed' implementations shall support at least
1 8192 byte line lengths. GNU 'sed' has no built-in limit on line length;
1 as long as it can 'malloc()' more (virtual) memory, you can feed or
1 construct lines as long as you like.
1
1 However, recursion is used to handle subpatterns and indefinite
1 repetition. This means that the available stack space may limit the
1 size of the buffer that can be processed by certain patterns.
1