I write a script which sends the input file to CPP, then to grep, then to a certain program:
cpp $1 | grep -v "#" | theprogram
But, "theprogram" requires the input to start with a certain constant line "theprogram-1.0". So, I want to prepend that constant line to the output of grep, just before it is sent to "theprogram".
Of course, I can do all this using a temporary file... but I am sure there is a way to do such a simple task in a single line of shell pipes, without temporary files. What is the trick?