How to bring together two inputs in case?

Hi guys,

im newbie, im trying something, but cannot figure out how to bring together case with 2 inputs.
Something like "enter your name" and "enter your age".

I had idea but dont now how to finish it as I said i'm just a beginner.

#!/bin/bash
echo "Name"
echo -n "Enter your name: "
read name
echo -n "enter your age: "
read age
echo
case $name,$age in
"Thomas Muller"|35) echo "you are too old" ;;
"Luka modric"|28) echo "you are boring" ;;
esac

when i try it nothing happens, I had idea how i can solve it in pascal nad converted it to bash, but i really dont know if it is possible.

if [ "$name" == "name" ] && [ "$age" == "age" ]; then 
  echo "$age";

You want to check for the combination of the two?

Something like:

$ name="carlo"
$ age="old"
$ case ${name}${age} in
> "carloold") echo "You are old and grumpy" ;;
> *) echo "You're not me" ;;
> esac
You are old and grumpy

Yes dear Carlo something like this, if he enter the name for exmaple Thomas Muller, but the age is not correct the echo "you are too old" will not appear.

i'm just learning bash and looking for tutorials. am I on the right way? :slight_smile: