diff <(cmd1) <(cmd2)

Category: I/O Redirection & Pipes

diff <(cmd1) <(cmd2)

Process substitution — use command output as a file

Process substitution: runs cmd1 and cmd2, treating their outputs as if they were files. diff can then compare them.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.