File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ At the beginning of your script add the following color functions:
83
83
# #
84
84
green=' \e[32m'
85
85
blue=' \e[34m'
86
+ red=' \e[31m'
86
87
clear=' \e[0m'
87
88
88
89
# #
@@ -127,8 +128,8 @@ $(ColorBlue 'Choose an option:') "
127
128
3) tcp_check ; menu ;;
128
129
4) kernel_check ; menu ;;
129
130
5) all_checks ; menu ;;
130
- 0) exit 0 ;;
131
- * ) echo -e $ red" Wrong option." $ clear; WrongCommand ;;
131
+ 0) exit 0 ;;
132
+ * ) echo -e " ${ red} Wrong option.${ clear} " ; menu ;;
132
133
esac
133
134
}
134
135
```
@@ -165,7 +166,7 @@ Finally, we have a switch case which triggers a different function depending on
165
166
4) kernel_check ; menu ;;
166
167
5) all_checks ; menu ;;
167
168
0) exit 0 ;;
168
- * ) echo -e $ red" Wrong option." $ clear; WrongCommand ;;
169
+ * ) echo -e " ${ red} Wrong option.${ clear} " ; menu ;;
169
170
esac
170
171
```
171
172
@@ -236,6 +237,7 @@ function all_checks() {
236
237
# #
237
238
green=' \e[32m'
238
239
blue=' \e[34m'
240
+ red=' \e[31m'
239
241
clear=' \e[0m'
240
242
241
243
# #
@@ -267,7 +269,7 @@ $(ColorBlue 'Choose an option:') "
267
269
4) kernel_check ; menu ;;
268
270
5) all_checks ; menu ;;
269
271
0) exit 0 ;;
270
- * ) echo -e $ red" Wrong option." $ clear; WrongCommand ;;
272
+ * ) echo -e " ${ red} Wrong option.${ clear} " ; menu ;;
271
273
esac
272
274
}
273
275
You can’t perform that action at this time.
0 commit comments