title: bash: boolean in while loop
body: <p>This is probably a very simple / stupid question, but I am not understanding why I am not getting the expected value when I run this:</p>
  
  <pre><code>FOUND_FRONTDEV=false
  
  echo "$PATHS" |
    while IFS= read -r line
  do
      FOUND_FRONTDEV=true
      echo "$FOUND_FRONTDEV"
      break
  done
  
  echo "$FOUND_FRONTDEV"
  </code></pre>
  
  <p>It returns "true" then "false". It looks like the variable is local but it should not be. I am really confused why my second echo prints false. Does anyone know please?</p>