From a516c9e5febedc52f2127413830926a1fc3459a2 Mon Sep 17 00:00:00 2001 From: Nyx <144965845+nnyyxxxx@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:31:07 -0400 Subject: [PATCH] Remove bashism from enable monitor (#467) Co-authored-by: nnyyxxxx --- tabs/utils/monitor-control/enable_monitor.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tabs/utils/monitor-control/enable_monitor.sh b/tabs/utils/monitor-control/enable_monitor.sh index 6d6ec5b6..2173f7f1 100755 --- a/tabs/utils/monitor-control/enable_monitor.sh +++ b/tabs/utils/monitor-control/enable_monitor.sh @@ -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}"