-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

Sorted what? 😯

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.


Help me, internet

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:

process subsitution

(same, via web, because the gemini version stopped responding - did I break it??)


Summary, for my own reference when I've forgotten how to do it again

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.


#bash

(works in at least some other shells)


back to gemlog

-- Response ended

-- Page fetched on Fri May 3 17:17:31 2024