title: Bash nested if statements with several conditions
body: <p>I'm currently struggling on nested if statements in Bash.
  Here's what I'm currently trying to do : </p>
  
  <pre><code>if [[ `echo "$command" | cut -d "_" -f 2` == "CAPTURE" ]]; then
      if [[ "$status_general" != "Capturing" &amp;&amp; "$status_capture" != "Running" ]]; then
          if [[ `echo "$command" | cut -d "_" -f 3-` == "" ]]; then
              *Further instructions here...*
  </code></pre>
  
  <p>I've checked everything, from if statements proper closure to even trying with several other expressions, but upon running my script and entering the second if statement (the one with 2 expression to check), Bash outputs : </p>
  
  <pre><code>line 198: [[ Idle : command not found
  </code></pre>
  
  <p>"Idle" is actually the initial value of the <code>$status_general</code> variable, but why on earth isn't the test built-in <code>[[</code> not evaluating what's inside the brackets ?
  Is my syntax wrong ?</p>
  
  <p>Thanks in advance for your replies.</p>