Passing result of compare -metric to variable - Picture from IMAGEMAGICK

3

I'm comparing two images using ImageMagick on the LINUX Terminal.

When I type in the terminal line this (below) it returns me a value:

$ compare -metric mae 0.jpg 2.jpg null:

But I can not put this value in a variable and then make a comparison within a BASH script. Below is how I write and it gives me error (or rather: The variable is still empty and the value still exits on the screen):

var='compare -metric mae 0.jpg 2.jpg null:'

It does not even work:

var=$(compare -metric mae 0.jpg 2.jpg null:)

When I type: echo $var nothing comes out! Someone help me?

How do I pass a variable to the value of a COMPARE -METRIC ?

    
asked by anonymous 18.12.2017 / 04:30

0 answers