I'm working with a software which reads a trace file with multiple entries, each of which are of format:
<...>,<...>,<64 character string>
This 64 character string is in my case constitute entirely of '0'.
Would it be possible to have something like sed for file streams (not stdin, file stream opened using open syscall) which would allow me to feed the said program a file with following entries:
and the program would replace '&' with 64 '0's. The problem with using sed on the trace file itself before executing the program is the limited space available on the machine.
My current plan is to use ptrace to intercept read syscalls and make it appear for the program as if it is reading a normal file, would that be a good idea?
The program parses the file only once.