Sample Header Ad - 728x90

how to get user input with a prompt into a variable in a posix compliant way

4 votes
1 answer
3522 views
read -r -p "put an option: " option
echo $option
this works but shellcheck gives me:
In POSIX sh, read -p is undefined.
How to get user input with a prompt into a variable in a posix compliant way?
Asked by testoflow (137 rep)
May 20, 2021, 08:31 PM
Last activity: May 20, 2021, 10:59 PM