Here I am trying to test my bash script where it is prompting four times.
#!/bin/bash
date >/opt/prompt.txt
read -p \"enter one: \" one
echo $one
echo $one &g
The reason is that the questions are interpreted as regexps. Hence you must escape characters with a special meaning in regular expressions, such as -()[]\?*. et cetara.
Hence:
'Enter current password for root (enter for none):'
should instead be:
'Enter current password for root \(enter for none\):'
Good luck!