Sample Header Ad - 728x90

Basic sed command on large one-line file: couldn't re-allocate memory

11 votes
3 answers
11848 views
I have a 250 MB text file, all in one line. In this file I want to replace a characters with b characters: sed -e "s/a/b/g" < one-line-250-mb.txt It fails with: sed: couldn't re-allocate memory It seems to me that this kind of task could be performed inline without allocating much memory. Is there a better tool for the job, or a better way to use sed? --- GNU sed version 4.2.1 Ubuntu 12.04.2 LTS 1 GB RAM
Asked by Nicolas Raoul (8465 rep)
Dec 19, 2013, 03:31 AM
Last activity: Dec 2, 2023, 02:44 PM