How do I zcat two files inline to perform diff?

838 Views Asked by At

How can I zcat 2 .gz files inline to perform a diff in unix? Have tried eval but syntax not right.

zcat file1.gz zcat file2.gz
1

There are 1 best solutions below

0
On

You can use Process Substitution:

diff <(zcat file1.gz) <(zcat file2.gz)