I am pretty new to BASH, had a good look around and cannot seem to get my head around the syntax for a case statement.
I basically want to allow the user to select a region and then let the case statement assign that to a variable called $region, which will be used later in the script.
Any assistance most appreciated.
echo 'u = UKI'
echo 'e = EU'
echo 'a = NA'
read choices;
case "$choices" in
u) region = "eu-west-2" ;;
e) region = "eu-central-2" ;;
a) region = "us-east-3" ;;
*) Invalid Choice ;;
esac
echo $region
I seem to be getting a : region: command not found error.