in reply to diff output; unix commands

open FOO, "diff $args $file1 $file2 |"
then reading from <FOO> should do the trick.