On Tue, Jan 20, 2015 at 1:33 PM, Bernhard Voelker
On 01/20/2015 05:17 PM, Andreas Schwab wrote:
Claudio Freire
writes: diff, for example, needs file inputs. So you need to create a file in order to compare against the original.
diff can work with pipes, FWIW.
and the shell syntax <(...) may help, too. E.g. compare /etc/SuSE-release on localhost vs. that on a server:
$ diff -u /etc/SuSE-release <( ssh $SERVER 'cat /etc/SuSE-release' ) --- /etc/SuSE-release 2013-06-03 13:15:06.000000000 +0200 +++ /dev/fd/63 2015-01-20 17:31:17.280034243 +0100 @@ -1,3 +1,3 @@ -SUSE Linux Enterprise Server 11 (x86_64) -VERSION = 11 +SUSE Linux Enterprise Server 10 (i586) +VERSION = 10 PATCHLEVEL = 3
Exactly my point. Not a trivial thing to write in a safe manner, covering all corner cases (ie: you have to generate the comparison target twice, one for diff, one for creating the file, and make sure both times it's exactly the same, and that they don't generate temporaries). -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org