Hi,

According to ''help read'' we can specify  -N[chars]  to trigger return
automatically.  Is it possible to approach read differently?

For example:  $re is some regular expression

read -N$re -p "Enter two or three digits to continue " getInput

The above is much of a pseudo-code but I hope you get the idea.

 -N in this case should be able to handle a range of 2 or 3 chars. If the
regex is satisfied then return should be triggered after 2 chars otherwise
wait for the third char.

Thanks in advance!

-- 
Met vriendelijke groet / Kind regards,

Valentin

Reply via email to