If you can change the processor code for stdin serial output, then stdout single line command can be simple:
generator | processor | verifier
Otherwise, you can use this
generator | tee in.txt | processor | verifier in.txt
The tee command duplicates stdout and redirects one stream to in.txt and the other to the next. In this case, you need to change the verifier to read the processor output from stdin , and the file generated by the generator is passed as a parameter.
I know that you are looking for a method to duplicate and redirect stdin to stdout , but I donβt know about it and honestly I donβt think it is possible
Davide berra
source share