How to pass enter key or selected character in bash script?

hi,
i've bash script thats working...
but now i need to add a line....that prompts for user input....like yes and 1 as complete install....

so here's how it looks...

$ cd 9200 (cd into directory)

$./install (hv to type ./install to run install then ask for)
----do you want to install
press y for yes n for no.
Y (here's needs to press Y------this is where i stuck)

then it prompts for

1 for complete install or 2 for server install
1 (here needs to press 1 ---------this is where i stuck)

then it completes the installation.

needed script to select Y for yes and then 1 for complete automatically and finish the installation....
would be great to hear.

thanks

Checkout the read command then proceed based on the entered answer:

read -p "Do you want to install? [y,n]:  " answer

Try

$ cat s.sh 
#!/bin/bash

echo -n "Do you want to install press [yes] to install  [no] to stop: "
read yno
case $yno in

        [yY] | [yY][Ee][Ss] )
                echo "Received Permission"
                ;;

        [nN] | [n|N][O|o] )
                echo "No, installation terminates here";
                exit 1
                ;;
        *) echo "Invalid input"
            ;;
esac
$ bash s.sh
Do you want to install press [yes] to install  [no] to stop: yes
Received Permission

$ bash s.sh
Do you want to install press [yes] to install  [no] to stop: n
No, installation terminates here

$ bash s.sh
Do you want to install press [yes] to install  [no] to stop: 
Invalid input

Thank you all for your prompt help & suggestion.

i think i didn't clarify earlier my mistake...sorry abt that.

actually,
$./install (is the program the vendor provided inorder to install software)
during installation it will prompt for Yes for Y after that 1 for complete install...
so basically,

#!/bin/bash
mount -t nfs 192.168.1.100:/software /temp (where its located on the network)
./install

after that i want script to enter Yes for Y and 1 for complete install...

is that something doable...would be glad to hear.

thanks much.

Did you consider stdin redirection?