Pass command output as a pseudo-file.
Section: Input Output and Pipelines
Use process substitution
bash
bash
diff <(sort old.txt) <(sort new.txt)Explanation
Handy when a command expects file arguments but you want to compare pipeline output.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Input Output and Pipelines