33.8 Batch Editing Gotcha: Editors Bomb on Big FilesPeople use the ed editor with script files to make global edits. But many versions of ed can't edit large files. The ex editor is usually better, but it has limits, too. How large is "large"? That depends on your version. Most ed s I've seen can't handle more than about 100,000 characters. There are no limits on sed ( 34.24 ) , although you'll need to save its output somehow ( 34.3 ) , and your editing script may have to be changed to work with sed . [1] Here's what you'll see when ed bombs:
%
The
Unfortunately for programmers,
ed
may not return an error status
that you can test.
There are
workarounds (
46.9
)
,
though. When the
- |
|