I know how to create a menu using select and case. What i want to know is,how can i create a menu using select and case where the menu options are in colored text?
---------- Post updated at 02:50 AM ---------- Previous update was at 02:42 AM ----------
if the menu options are like:
1) gl35a
2) t2000
3) s531
4) vt99
5) gdjk
I want the numbers (like "1)") in green and the options (like gl35a,t2000 etc) in yellow.
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
$ printf "\033[40;32mGREEN\n\033[m"
GREEN
$ printf "\033[40;33mYELLOW\n\033[m"
YELLOW
Script to generate all colors:
for foreground in 0 1 2 3 4 5 6 7; do
for bold in '' ';1'; do
for background in 0 1 2 3 4 5 6 7; do
color="4$background;3$foreground"
printf "\033[$color${bold}m $color${bold:- } \033[m"
done
echo
done
done