Compare files on remote servers using process substitution
brian_s 270002K5X3 Comment (1) Visits (2035)
A little known feature of the bash
shell is process substitution. This essentially allows you to take
commands that normally require files as input and instead provide
them the output of commands as input.
One example of this is if you need to compare the contents of files on 2 remote servers. The following command will run diff against the /etc/group file on 2 servers:
Without process substitution this same thing could be done, but it would require multiple steps and temporary files.