read from std i/p with timeout within a script

hello every one ,
this is my first participation in the forum , I hope it'll be a good start

within a script I would like to put some code to read i\p from standard i\p using read command if it reads Y it will terminate the script if it reads N it will continue execution , if no i\p is provided after a timeout it will get a default value N and continue execution.

your help is highly appreciated

not a good start for me
I found the answer some place else in the forum.
I should search more before asking
the answer is to use read -t
thanx all

Searching and finding answers is a good start. You are motivating me to install a point system where searches give high points. LOL.

Welcome.