title: Finding out the type of a triangle in Bash
body: <p>I have this block of code to determine whether a triangle is <strong>Isosceles, Scalene or Equilateral</strong> after reading three inputs, <strong>X</strong> , <strong>Y</strong> and <strong>Z</strong>.
  Its constraints are:</p>
  
  <ol>
  <li>It should be between 1 and 1000</li>
  <li>The sum of any two sides should be greater than the third </li>
  </ol>
  
  <p>It works well except for specific numbers such as 5 and 6 in which it doesn't output anything.</p>
  
  <pre><code>read X
  read Y
  read Z
  
  if [[ $X -lt 1000 &amp;&amp; $Y -lt 1000 &amp;&amp; $Z -lt 1000 ]]
  then 
      if [[ $X -gt 1 &amp;&amp; $Y -gt 1 &amp;&amp; $Z -gt 1 ]]
      then
          if [[ $((X + Y)) &gt; $Z  &amp;&amp;  $((X + Z)) &gt; $Y  &amp;&amp;  $((Y + Z)) &gt; $X ]]
          then
              if [[ $X == $Y  &amp;&amp;  $X == $Z &amp;&amp; $Y == $Z ]]
              then
                  echo EQUILATERAL
              elif [[ $X == $Y &amp;&amp; $X == $Z ]] || [[ $Y == $Z || $Y == $X ]] || [[ $Z == $Y || $Z == $X ]]
              then 
                  echo ISOSCELES
              else
                  echo SCALENE
              fi
          fi
      fi
  
  fi
  </code></pre>
  
  <p>Please explain why it's not working as expected</p>