Source: https://crashingdaily.wordpress.com/2008/03/06/diff-two-stdout-streams/
You can diff two commands stdout without creating two files. <( ... ) command creates a temporary file with the stdout of the command inside it.
Example:
diff -B <( ls -1 / ) <( ls -1 ~ )