Diff output from two programs without temporary files

Use <(command) to pass one command’s output to another program as if it were a file name. Bash pipes the program’s output to a pipe and passes a file name like /dev/fd/63 to the outer command.

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

Similarly you can use >(command) if you want to pipe something into a command.

This is called “Process Substitution” in Bash’s man page.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)