Diff Two Command Outputs: Difference between revisions
From Leo's Notes
This page was last edited on 1 September 2019, at 03:43.
m Text replacement - "</code>" to "}}" |
m Text replacement - "Category:Linux " to "Category:Linux{{Navbox Linux}} " |
||
| Line 8: | Line 8: | ||
[[Category:Linux]] | [[Category:Linux]]{{Navbox Linux}} | ||
[[Category:TipsnTricks]] | [[Category:TipsnTricks]] | ||
{{Navbox Linux}} | {{Navbox Linux}} | ||
Revision as of 03:43, 1 September 2019
To diff the outputs of two command outputs, such as two ls's, run:
diff <(cd directory1; ls) <(cd directory2; ls)
This is assuming you are using bash, or a shell that can handle sub shells and pipes similar to bash such as zsh.
| ||||||||||||||||||||||||||