1 | #!/bin/sh
|
---|
2 | echo -e
|
---|
3 | echo -e "+----------------------------------------------------+"
|
---|
4 | echo -e "|Codes couleur ANSI : |"
|
---|
5 | echo -e "+----------------------------------------------------+"
|
---|
6 | echo -e "ESC[xm :"
|
---|
7 | echo -e " x = 0 1 2 3 4 5 6 7"
|
---|
8 | echo -e " \033[0m abcd \033[0m\033[1m abcd \033[0m\033[2m abcd \033[0m\033[3m abcd \033[0m\033[4m abcd \033[0m\033[5m abcd \033[0m\033[6m abcd \033[0m\033[7m abcd \033[0m"
|
---|
9 | echo -e
|
---|
10 | echo -e " ------------------------------ "
|
---|
11 | echo -e "ESC[x;ym :"
|
---|
12 | echo -e " x = 40 41 42 43 44 45 46 47"
|
---|
13 | for cpt in 1 4 7; do
|
---|
14 | echo -e "y=$cpt \033[40;${cpt}m abcd \033[41;${cpt}m abcd \033[42;${cpt}m abcd \033[43;${cpt}m abcd \033[44;${cpt}m abcd \033[45;${cpt}m abcd \033[46;${cpt}m abcd \033[47;${cpt}m abcd \033[0m"
|
---|
15 | done
|
---|
16 | cpt=30
|
---|
17 | while [ $cpt -lt 38 ]
|
---|
18 | do
|
---|
19 | echo -e "y=$cpt \033[40;${cpt}m abcd \033[41;${cpt}m abcd \033[42;${cpt}m abcd \033[43;${cpt}m abcd \033[44;${cpt}m abcd \033[45;${cpt}m abcd \033[46;${cpt}m abcd \033[47;${cpt}m abcd \033[0m"
|
---|
20 | cpt=`expr $cpt + 1`
|
---|
21 | done
|
---|
22 | echo -e " ------------------------------ "
|
---|
23 |
|
---|
24 |
|
---|