-- Leo's gemini proxy
-- Connecting to freeshell.de:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini;lang=en-GB
I have two files that I think contain the same lines, but not in the same order. Obviously I can sort them to temporary files and diff those. But, I've seen a simpler way and I can't remember how it works.
I mean to do a web search for "sorted diff" but I accidentally do a Wikipedia search, and it says:
> Did you mean: sorted dick
Er, no! But... you have a page for that? (click)
> The page "Sorted dick" does not exist.
Happily, the other suggestions include what I want:
The mind readers at Wikipedia have given me exactly what I want. Spooky.
diff <(sort file1) <(sort file2)
It lets diff read from the sort outputs as if they were files.
And my files turn out to be as identical as I thought.
(works in at least some other shells)
-- Response ended
-- Page fetched on Fri May 3 17:17:31 2024