I have a program that writes to stdout. Is there a way that I can redirect the output to the Linux diff command or do I have to write the output to a file and then compare that?
For example, I have a bunch of test input files for a program and the corresponding expected output in another set of files. And I'd like to do something like ./program < t1.input | diff t1.expected
.