I’ve got two programs: p3, p4 and one input file: 1.in. I want to check if p3 and p4 outputs are the same for 1.in input file and nothing that I write works. I want to do this without creating new files (I simply want to know how to do this to better know bash). I tried some naive combinations like:
diff (./p3 < 1.in) (./p4< 1.in)
But it doesn’t work of course. Can anyone help? I’m using ubuntu 11.04.
You can use process substitution in bash to compare the outputs of two commands. For example, try:
(And for prettier output you could use
colordiffinstead ofdiff:))