mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 13:22:28 +00:00
Remove bashism from enable monitor (#467)
Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
parent
c805c46dfc
commit
a516c9e5fe
|
@ -21,7 +21,8 @@ enable_monitor() {
|
|||
i=$((i + 1))
|
||||
done
|
||||
|
||||
read -p "Enter the number of the monitor: " monitor_choice
|
||||
printf "Enter the number of the monitor: "
|
||||
read -r monitor_choice
|
||||
|
||||
if ! echo "$monitor_choice" | grep -qE '^[0-9]+$' || [ "$monitor_choice" -lt 1 ] || [ "$monitor_choice" -gt "$((i - 1))" ]; then
|
||||
printf "%b\n" "${RED}Invalid selection.${RC}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user