29 / 55 · 19 Linux & Command Line · Pipes and Redirection← prev⊞ allnext →☰ Read as one page
4.6Process Substitution
Process substitution lets you use a command's output as if it were a file:
# Compare the output of two commands
diff <(curl -s https://staging.example.com/api/config) <(curl -s https://prod.example.com/api/config)
# Compare sorted output
diff <(sort file1.txt) <(sort file2.txt)