Unix trick Show more
Favourite #Unix trick in GNU #bash:
$ diff -u <(some command) <(some other command)
Shows you the differences between the outputs of any two commands, anything at all.
@JordiGH I love <(...) forget what they call it
@jordyd I call it "the duck head."
@jordyd No, but seriously, it's called "process substitution".
@JordiGH so close
@JordiGH I think they should call it "temporary resubstitution" because it's kind of like creating a temporary file, redirecting the output of a command, and then substituting the filename
@JordiGH Ha, with this I can do stuff like `diff -W 300 -y <(ssh host1 "find /some/dir -type f | xargs sha256sum") <(ssh host2 "find /some/other/dir -type f | xargs sha256sum")` when I need to, which is pretty neat. 😎
Thank you Jordi!