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.
|
| |||
|
feedback
|
|
You can also do this:
| |||
|
feedback
|
|
In bash:
| |||||||||
feedback
|
|
In case you want to diff two outputs of programs, zsh is your friend:
| |||
|
feedback
|
