size limit for sed -f ?

Larry Wall lwall at jpl-devvax.JPL.NASA.GOV
Sat Jul 14 09:17:50 AEST 1990


In article <7110 at star.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
: In article <24929.269ba943 at kuhub.cc.ukans.edu>,
: 	arritt at kuhub.cc.ukans.edu writes:
: )Is there a limit to the size of the modification file that can be used
: )with sed?  (Not the source file, but the file containing the sed commands.)
: 
: Yes.  Even under POSIX there are still (lower) limits, though fairly high.
: You have to divide your script into (orthogonal) parts and invoke sed a
: couple of times in a pipeline:
: 
: 	sed -f script1.sed input_file | sed -f script2.sed | ...

Well, that's one way to do it.  Another way is to run it through the
sed-to-perl translator and execute the resulting Perl script.  Perl doesn't
have such limits.

And it might even run faster.

Larry Wall
lwall at jpl-devvax.jpl.nasa.gov



More information about the Comp.unix.questions mailing list