I have a large file, several gig of binary data, with an ASCII header at the top. I need to make a few small changes to the ASCII header. sed
does the job, but it takes a fair bit of time since the file is so large. vi/vim
is slow too. Is there any linux utility that can just go into the file, make the change at the top, and then get out quickly?
An example might be a header that looks like:
Code Rev: 3.5
Platform: platform1
Run Date: 12/13/16
Data source: whatever
Restart: False
followed by a large amount of binary data ....
and then I might need to, for example, edit an error in "Data source".