File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
tabs/utils/monitor-control Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ disable_monitor() {
20
20
i=$(( i + 1 ))
21
21
done
22
22
23
- read -p " Enter the number of the monitor: " monitor_choice
23
+ printf " %b\n" " Enter the number of the monitor: "
24
+ read -r monitor_choice
24
25
25
26
if ! echo " $monitor_choice " | grep -qE ' ^[0-9]+$' || [ " $monitor_choice " -lt 1 ] || [ " $monitor_choice " -gt " $(( i - 1 )) " ]; then
26
27
printf " %b\n" " ${RED} Invalid selection.${RC} "
@@ -44,7 +45,8 @@ disable_monitor() {
44
45
confirm_action () {
45
46
action=" $1 "
46
47
printf " %b\n" " ${YELLOW} $action ${RC} "
47
- read -p " Are you sure? (y/n): " confirm
48
+ printf " %b\n" " Are you sure? (y/n): "
49
+ read -r confirm
48
50
if echo " $confirm " | grep -qE ' ^[Yy]$' ; then
49
51
return 0
50
52
else
You can’t perform that action at this time.
0 commit comments