title: Boolean in Shell Scripting
body: <p>I have a problem with boolean for while loop. As such, I switch to for loop instead.
  But still, I cannot change the value of a boolean after the condition is met.</p>
  
  <pre><code>doFirst= true
      for (( j=1; j&lt;=7; j++))
      do
              letter="A"
              seatChoses=$letter$j
  
              flagRand=$(echo $flightSeatBooked | awk -v flseatRand=$flightSeatBooked -v orseatRand=$seatChoses '{print match(flseatRand, orseatRand)}')
              if  $doFirst ; then
              **$doFirst= false** // Here is the error!
                  if [ $flagRand -eq 0 ]; then
                      echo "System generated a slot, "$seatChoses" for you. [Y or N]"
                  fi
              fi
  
      done
  </code></pre>