Normally you would write:
diff file1 file2
But I would like to diff a file and output from the command (here I make command a trivial one):
diff file1 <(cat file2 | sort)
Ok, this work when I enter this manually at shell prompt, but when I put exactly the same line in shell script, and then run the script, I get error.
So, the question is -- how to do this correctly?
Of course I would like avoid writing the output to a temporary file.