Quantcast
Channel: linux – The Road to Elysium
Viewing all articles
Browse latest Browse all 12

Compare the output of two commands

$
0
0

..without creating a temporary file:

diff -y <(ls First_directory) <(ls Second_directory)

The -y is just to show a side-by-side comparison. Very handy! And the result?

[jorge@j-laptop temp]$ diff -y <(ls First_directory) <(ls Second_directory)
common.txt							common.txt
first_file.txt						      |	second_file.txt

Thanks to my colleague Ingvar for showing me this!


Viewing all articles
Browse latest Browse all 12

Trending Articles