[plug] Extreme text editing

John Clayton mageaere at hotmail.com
Wed Oct 8 03:06:35 WST 2003


I have been reading all the responses to this thread and I don't know too 
much about sed and using dd to get at the insides of files but what I would 
do is use split to break up the file into manageable pieces, vi the piece 
that needed editing and then use cat to stick them back together again.
I don't know how long the split and cat operations would take but I think 
that the vi operation would take significantly less time that 45 mins.


>From: J Michael Gilks <mike at gilks1.com>
>Reply-To: plug at plug.linux.org.au
>To: plug at plug.org.au
>Subject: [plug] Extreme text editing
>Date: Tue, 7 Oct 2003 21:52:59 +0800
>
>Today I had an unfortunate experience with a large text file. A guy had
>concatenated a number of files to form a MEGA velocity file which
>unfortunately had an error on line 10,557,152.
>The total file was 4.3GB on a remote NFS partition and contained 66,709,648
>lines. I eventually opened the file with VI navigated to line 10,557,152,
>changed the fifteen offending characters to spaces and closed the file 
>after
>saving.
>Unfortunately each operation took about 45 minutes. So 1.5 hours to load, 
>edit
>and save the file.
>Does anyone have any ideas about how this could be done without loading the
>entire file.
>I would have simply edited the offending source file and re concatenated 
>the
>whole lot, but the guy has gone on holiday and we are unsure exactly what 
>he
>did.
>
>Thanks in advance.
>
>Love
>Mike.
>_______________________________________________
>plug mailing list
>plug at plug.linux.org.au
>http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug

_________________________________________________________________
Chat via SMS. Simply send 'CHAT' to 1889918. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list