Remove the intermediate C program that was a nuisance whilst cross-compiling and replace it with a simple shell script that is just a combination of cat + sed.