I have been using the read command of bash to get interactive input
from a user on Redhat 7.3. Here is how i used the command:

read -e -p "Enter path to certificate file: " certfile
echo $certfile

It worked fine on Redhat 7.3 as the value i entered was correctly
stored in the certfile variable. However when I use the same command
on Redhat 8, here is the error I keep on getting:

': not a valid identifierne 1: read: `certfile

Why does this happen and what can be a more portable way of using
'read' that would work on all Linux versions?

Tahir Azim.