if [[ ${account_nr} =~ ^[0-9]+$ && ${from_account_nr} =~ ^[0-9]+$ ]]
This is intended to check whether the account number is numeric or not. I
This line is correct with advanced shells like Bash, Zsh or Ksh.
if [[ ${account_nr} =~ ^[0-9]+$ && ${from_account_nr} =~ ^[0-9]+$ ]]
It won't work with POSIX shells but -still- it won't show syntax error. Instead it would show that the command [[
was not found. Other causes may be related to the if
statement itself but you have to show us what message was exactly shown e.g. bash: syntax error near unexpected token `fi'