I am using Bash build-in read -p
to print message and read user input into REPLY, want a new line at end.
read -p "please input someint\n" did not work, it printed \n
rather than a new line.
How do I do that ?
thanks
I am using Bash build-in read -p
to print message and read user input into REPLY, want a new line at end.
read -p "please input someint\n" did not work, it printed \n
rather than a new line.
How do I do that ?
thanks
Try this out.
#!/bin/bash
read -p "Please input something
" msg
echo $msg
This will make read -p
print a new line. Hope this helps.