title: shell if statment executing even if its not true
body: <p>I have created a script to create/remove local user.</p>
  
  <p>code: </p>
  
  <pre><code>#!/bin/bash
  # This script can create or remove a local linux user.
  # --------------------------------------------------------
  
  # Ask if the user wants to create or delete user!
  read -p 'Do you want to create or delete user? (c/d) : ' TO_DO
  # Account creation
  if [[ "${TO_DO}" -eq 'c' ]]
  then
          read -p 'Enter the username to create : ' USER_NAME
          read -p 'Enter name of account holder : ' REAL_NAME
          read -ps 'Enter the password to set : ' PASSWORD_P1
          read -ps 'Please retype password : ' PASSWORD_P2
          if [[ "${PASSWORD_P1}" -eq "${PASSWORD_P2}" ]]; then
                  # Creating user.
                  useradd -c "${REAL_NAME}" -m "${USER_NAME}"
                  # Setting password.
                  echo "${PASSWORD_P1}\n${PASSWORD_P1}" | passwd "${USER_NAME}"
                  # Force user to reset password on next login
                  passwd -e "${USER_NAME}"
                  echo 'Account created succesfully'
          else
                  echo 'The password do not match.'
                  exit 2
          fi
  elif [[ "${TO_DO}" -eq 'd' ]]; then
          read -p 'Enter the username to delete : ' USER_NAME
          userdel -r "${USER_NAME}"
          echo 'Account deleted successfully'
  else
          echo 'Please choose appropriate options!'
          exit 3
  fi
  </code></pre>
  
  <p>WHEN I CHOOSE THE "d" OPTION. THE STATEMENTS OF "c" OPTIONS ARE EXECUTED.</p>
  
  <p>Shell:</p>
  
  <pre><code>sudo ./localUserManager.sh
  Do you want to create or delete user? (c/d) : d
  Enter the username to create : ^C
  </code></pre>
  
  <p>(HERE THE OPTION TO DELETE USERNAME SHOULD COME!)</p>