C-u M-| is wonderful for things like running
sort a region. But I've wandered into an interesting place. I wan to run
comm on two regions in a buffer.
# region 1 a 1 b 2 z 26 # region 2 a foobar b 2 c 3
and I want
join -j1 <(region 1) <(region 2).
I think registers or secondary selection could make this easier than the albeit already quick
# select region 1 M-| cat > /tmp/r1 # select region 2 M-| cat > /tmp/r2 # position cursor below M-| join -j1 /tmp/r
I don't see anything about referencing registers or selections in
shell-command-on-region but maybe there is a similar command, universal argument, or package?
Would it be outrageous to point to files through /proc or a la elfuse
(Edit: example output -- current buffer)
# region 1 a 1 b 2 z 26 # region 2 a foobar b 2 c 3 # join -j1 /tmp/r a 1 foobar b 2 2 # comm -12 /tmp/r b 2