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:
8383# #
8484green=' \e[32m'
8585blue=' \e[34m'
86+ red=' \e[31m'
8687clear=' \e[0m'
8788
8889# #
@@ -127,8 +128,8 @@ $(ColorBlue 'Choose an option:') "
127128 3) tcp_check ; menu ;;
128129 4) kernel_check ; menu ;;
129130 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 ;;
132133 esac
133134}
134135```
@@ -165,7 +166,7 @@ Finally, we have a switch case which triggers a different function depending on
165166 4) kernel_check ; menu ;;
166167 5) all_checks ; menu ;;
167168 0) exit 0 ;;
168- * ) echo -e $ red" Wrong option." $ clear; WrongCommand ;;
169+ * ) echo -e " ${ red} Wrong option.${ clear} " ; menu ;;
169170 esac
170171```
171172
@@ -236,6 +237,7 @@ function all_checks() {
236237# #
237238green=' \e[32m'
238239blue=' \e[34m'
240+ red=' \e[31m'
239241clear=' \e[0m'
240242
241243# #
@@ -267,7 +269,7 @@ $(ColorBlue 'Choose an option:') "
267269 4) kernel_check ; menu ;;
268270 5) all_checks ; menu ;;
269271 0) exit 0 ;;
270- * ) echo -e $ red" Wrong option." $ clear; WrongCommand ;;
272+ * ) echo -e " ${ red} Wrong option.${ clear} " ; menu ;;
271273 esac
272274}
273275
You can’t perform that action at this time.
0 commit comments