Remove bashism from enable monitor (#467)

Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
Nyx 2024-09-18 14:31:07 -04:00 committed by GitHub
parent c805c46dfc
commit a516c9e5fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,8 @@ enable_monitor() {
i=$((i + 1)) i=$((i + 1))
done 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 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}" printf "%b\n" "${RED}Invalid selection.${RC}"