How do I zcat two files inline to perform diff?

864 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 answers

0
Sean Bright On

You can use Process Substitution:

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