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?
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?
You could use read without -p:
printf "put an option: " >&2
read -r option
printf '%s\n' "$option"