How does one go about using diff
to compare the output of two commands?
I know how to use it to compare the contents of a file filename1
with the output of a command cmd2
:
cmd | diff filename -
How do I make it so that I can have another command, say cmd1
in place of filename
?
I'm using dash, which doesn't support process substitution.
diff <(cmd1) <(cmd2)
. – Apr 15 '19 at 02:29