Bash - comparing output of two commands
<p>I have this code:</p>

<pre><code>#!/bin/bash

CMDA=$(curl -sI website.com/example.txt | grep Content-Length)

CMDB=$(curl -sI website.com/example.txt | grep Content-Length)

if [ "CMDA" == "CMDB" ];then
  echo "equal";
else
  echo "not equal";
fi
</code></pre>

<p>with this output</p>

<pre><code>root@abcd:/var/www/html# bash ayy.sh
not equal
</code></pre>

<p>which should be "equal" instead of "not equal". What did I do wrong?</p>

<p>Thnaks</p>