Diff Two Command Outputs: Difference between revisions
From Leo's Notes
This page was last edited on 24 February 2017, at 19:12.
No edit summary |
m Text replacement - "<code>" to "{{code|" |
||
| Line 1: | Line 1: | ||
To | To {{code|diff</code> the outputs of two command outputs, such as two {{code|ls</code>'s, run: | ||
<syntaxhighlight lang="bash" line start="1" enclose="div"> | <syntaxhighlight lang="bash" line start="1" enclose="div"> | ||
Revision as of 19:12, 24 February 2017
To {{code|diff the outputs of two command outputs, such as two {{code|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.