Diff output from two programs without temporary files

后端 未结 6 935
梦谈多话
梦谈多话 2021-01-29 18:13

Say I have too programs a and b that I can run with ./a and ./b.

Is it possible to diff their outputs without first w

6条回答
  •  再見小時候
    2021-01-29 18:46

    For anyone curious, this is how you perform process substitution in using the Fish shell:

    Bash:

    diff <(./a) <(./b)
    

    Fish:

    diff (./a | psub) (./b | psub)
    

    Unfortunately the implementation in fish is currently deficient; fish will either hang or use a temporary file on disk. You also cannot use psub for output from your command.

提交回复
热议问题