diff STDOUT or other output streams

3 04 2014

The ‘diff’ shell command is useful for comparing text files, but also great for comparing shell outputs with this method:

diff <(ls -alh /or/something) <(ls -alh /or/whatever)

Add any favorite flags and go to town.

diff -y --suppress-common-lines <(ls -alh /or/something) <(ls -alh /or/whatever)

(Note: this may not work for all substitutions.)


Actions

Information

Leave a Reply

Your email address will not be published. Required fields are marked *




Skip to toolbar