title: logic errors in scripts
body: <pre><code>#!/bin/bash
  whilenum=1
  while [ $whilenum -lt 5 ]
  do 
  
  if  [ $whilenum == 1 ]
  then
  function funct1 {
  echo The value of whilenum is $whilenum
  }
  funct1 
  else break
  fi
  
  if (( $whilenum == 2 | $whilenum == 3 ))
  then
  for animal in dog bird turtle
  do
  echo $animal
  done
  fi  
  
  if [ $whilenum == 4 ]
  then
  echo Enter your name
  read username
  fi
  
  if [ ${#username} &gt;  8 ]
  then
  echo User name is long
  else
  echo User name is short
  
  fi
  
  whilenum=$(( $whilenum+1 ))
  done 
  </code></pre>
  
  <p>When I adjust the number to test the number nothing happens
  I made the while loop increment so it can terminate but not sure if its working. Not getting any syntax errors probably have a few logic errors</p>