read -p \"Please Enter a Message:\" message
How can I add a line break after Message:
?
From the bash
manpage:
-p prompt
Display prompt on standard error, without a trailing new-
line, before attempting to read any input. The prompt is
displayed only if input is coming from a terminal.
So, not with read
itself, and putting \n
in the message string just echoes \n
. The answer should be simple though - don't get read
to display the prompt:
echo "Please Enter a Message:" 1>&2
read message