From: Vincent Le Gallic Date: Sun, 29 Sep 2013 17:05:52 +0000 (+0200) Subject: Petits scripts pour faire joujou avec les couleurs dans le terminal. +1 X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=51dbba6de2b615a405e4a0fd4063c68a1533fc8b;p=scripts-20-100.git Petits scripts pour faire joujou avec les couleurs dans le terminal. +1 --- diff --git a/test_color.sh b/test_color.sh new file mode 100755 index 0000000..eb0f8da --- /dev/null +++ b/test_color.sh @@ -0,0 +1,18 @@ +#/bin/bash + +# Script idiot pour tester des textes colorés + +No_Color='\e[0m' + +tab=('fg black' 'fg black high' 'fg black bold' 'fg black underline' 'fg black underline high' 'fg black underline bold' 'fg red' 'fg red high' 'fg red bold' 'fg red underline' 'fg red underline high' 'fg red underline bold' 'fg green' 'fg green high' 'fg green bold' 'fg green underline' 'fg green underline high' 'fg green underline bold' 'fg yellow' 'fg yellow high' 'fg yellow bold' 'fg yellow underline' 'fg yellow underline high' 'fg yellow underline bold' 'fg blue' 'fg blue high' 'fg blue bold' 'fg blue underline' 'fg blue underline high' 'fg blue underline bold' 'fg purple' 'fg purple high' 'fg purple bold' 'fg purple underline' 'fg purple underline high' 'fg purple underline bold' 'fg cyan' 'fg cyan high' 'fg cyan bold' 'fg cyan underline' 'fg cyan underline high' 'fg cyan underline bold' 'fg white' 'fg white high' 'fg white bold' 'fg white underline' 'fg white underline high' 'fg white underline bold' +'bg black' 'bg black high' 'bg red' 'bg red high' 'bg green' 'bg green high' 'bg yellow' 'bg yellow high' 'bg blue' 'bg blue high' 'bg purple' 'bg purple high' 'bg cyan' 'bg cyan high' 'bg white' 'bg white high' +'both black , black' 'both black , black high' 'both black high , black' 'both black high , black high' 'both black bold , black' 'both black bold , black high' 'both black underline , black' 'both black underline , black high' 'both black underline high , black' 'both black underline high , black high' 'both black underline bold , black' 'both black underline bold , black high' 'both red , black' 'both red , black high' 'both red high , black' 'both red high , black high' 'both red bold , black' 'both red bold , black high' 'both red underline , black' 'both red underline , black high' 'both red underline high , black' 'both red underline high , black high' 'both red underline bold , black' 'both red underline bold , black high' 'both green , black' 'both green , black high' 'both green high , black' 'both green high , black high' 'both green bold , black' 'both green bold , black high' 'both green underline , black' 'both green underline , black high' 'both green underline high , black' 'both green underline high , black high' 'both green underline bold , black' 'both green underline bold , black high' 'both yellow , black' 'both yellow , black high' 'both yellow high , black' 'both yellow high , black high' 'both yellow bold , black' 'both yellow bold , black high' 'both yellow underline , black' 'both yellow underline , black high' 'both yellow underline high , black' 'both yellow underline high , black high' 'both yellow underline bold , black' 'both yellow underline bold , black high' 'both blue , black' 'both blue , black high' 'both blue high , black' 'both blue high , black high' 'both blue bold , black' 'both blue bold , black high' 'both blue underline , black' 'both blue underline , black high' 'both blue underline high , black' 'both blue underline high , black high' 'both blue underline bold , black' 'both blue underline bold , black high' 'both purple , black' 'both purple , black high' 'both purple high , black' 'both purple high , black high' 'both purple bold , black' 'both purple bold , black high' 'both purple underline , black' 'both purple underline , black high' 'both purple underline high , black' 'both purple underline high , black high' 'both purple underline bold , black' 'both purple underline bold , black high' 'both cyan , black' 'both cyan , black high' 'both cyan high , black' 'both cyan high , black high' 'both cyan bold , black' 'both cyan bold , black high' 'both cyan underline , black' 'both cyan underline , black high' 'both cyan underline high , black' 'both cyan underline high , black high' 'both cyan underline bold , black' 'both cyan underline bold , black high' 'both white , black' 'both white , black high' 'both white high , black' 'both white high , black high' 'both white bold , black' 'both white bold , black high' 'both white underline , black' 'both white underline , black high' 'both white underline high , black' 'both white underline high , black high' 'both white underline bold , black' 'both white underline bold , black high' 'both black , red' 'both black , red high' 'both black high , red' 'both black high , red high' 'both black bold , red' 'both black bold , red high' 'both black underline , red' 'both black underline , red high' 'both black underline high , red' 'both black underline high , red high' 'both black underline bold , red' 'both black underline bold , red high' 'both red , red' 'both red , red high' 'both red high , red' 'both red high , red high' 'both red bold , red' 'both red bold , red high' 'both red underline , red' 'both red underline , red high' 'both red underline high , red' 'both red underline high , red high' 'both red underline bold , red' 'both red underline bold , red high' 'both green , red' 'both green , red high' 'both green high , red' 'both green high , red high' 'both green bold , red' 'both green bold , red high' 'both green underline , red' 'both green underline , red high' 'both green underline high , red' 'both green underline high , red high' 'both green underline bold , red' 'both green underline bold , red high' 'both yellow , red' 'both yellow , red high' 'both yellow high , red' 'both yellow high , red high' 'both yellow bold , red' 'both yellow bold , red high' 'both yellow underline , red' 'both yellow underline , red high' 'both yellow underline high , red' 'both yellow underline high , red high' 'both yellow underline bold , red' 'both yellow underline bold , red high' 'both blue , red' 'both blue , red high' 'both blue high , red' 'both blue high , red high' 'both blue bold , red' 'both blue bold , red high' 'both blue underline , red' 'both blue underline , red high' 'both blue underline high , red' 'both blue underline high , red high' 'both blue underline bold , red' 'both blue underline bold , red high' 'both purple , red' 'both purple , red high' 'both purple high , red' 'both purple high , red high' 'both purple bold , red' 'both purple bold , red high' 'both purple underline , red' 'both purple underline , red high' 'both purple underline high , red' 'both purple underline high , red high' 'both purple underline bold , red' 'both purple underline bold , red high' 'both cyan , red' 'both cyan , red high' 'both cyan high , red' 'both cyan high , red high' 'both cyan bold , red' 'both cyan bold , red high' 'both cyan underline , red' 'both cyan underline , red high' 'both cyan underline high , red' 'both cyan underline high , red high' 'both cyan underline bold , red' 'both cyan underline bold , red high' 'both white , red' 'both white , red high' 'both white high , red' 'both white high , red high' 'both white bold , red' 'both white bold , red high' 'both white underline , red' 'both white underline , red high' 'both white underline high , red' 'both white underline high , red high' 'both white underline bold , red' 'both white underline bold , red high' 'both black , green' 'both black , green high' 'both black high , green' 'both black high , green high' 'both black bold , green' 'both black bold , green high' 'both black underline , green' 'both black underline , green high' 'both black underline high , green' 'both black underline high , green high' 'both black underline bold , green' 'both black underline bold , green high' 'both red , green' 'both red , green high' 'both red high , green' 'both red high , green high' 'both red bold , green' 'both red bold , green high' 'both red underline , green' 'both red underline , green high' 'both red underline high , green' 'both red underline high , green high' 'both red underline bold , green' 'both red underline bold , green high' 'both green , green' 'both green , green high' 'both green high , green' 'both green high , green high' 'both green bold , green' 'both green bold , green high' 'both green underline , green' 'both green underline , green high' 'both green underline high , green' 'both green underline high , green high' 'both green underline bold , green' 'both green underline bold , green high' 'both yellow , green' 'both yellow , green high' 'both yellow high , green' 'both yellow high , green high' 'both yellow bold , green' 'both yellow bold , green high' 'both yellow underline , green' 'both yellow underline , green high' 'both yellow underline high , green' 'both yellow underline high , green high' 'both yellow underline bold , green' 'both yellow underline bold , green high' 'both blue , green' 'both blue , green high' 'both blue high , green' 'both blue high , green high' 'both blue bold , green' 'both blue bold , green high' 'both blue underline , green' 'both blue underline , green high' 'both blue underline high , green' 'both blue underline high , green high' 'both blue underline bold , green' 'both blue underline bold , green high' 'both purple , green' 'both purple , green high' 'both purple high , green' 'both purple high , green high' 'both purple bold , green' 'both purple bold , green high' 'both purple underline , green' 'both purple underline , green high' 'both purple underline high , green' 'both purple underline high , green high' 'both purple underline bold , green' 'both purple underline bold , green high' 'both cyan , green' 'both cyan , green high' 'both cyan high , green' 'both cyan high , green high' 'both cyan bold , green' 'both cyan bold , green high' 'both cyan underline , green' 'both cyan underline , green high' 'both cyan underline high , green' 'both cyan underline high , green high' 'both cyan underline bold , green' 'both cyan underline bold , green high' 'both white , green' 'both white , green high' 'both white high , green' 'both white high , green high' 'both white bold , green' 'both white bold , green high' 'both white underline , green' 'both white underline , green high' 'both white underline high , green' 'both white underline high , green high' 'both white underline bold , green' 'both white underline bold , green high' 'both black , yellow' 'both black , yellow high' 'both black high , yellow' 'both black high , yellow high' 'both black bold , yellow' 'both black bold , yellow high' 'both black underline , yellow' 'both black underline , yellow high' 'both black underline high , yellow' 'both black underline high , yellow high' 'both black underline bold , yellow' 'both black underline bold , yellow high' 'both red , yellow' 'both red , yellow high' 'both red high , yellow' 'both red high , yellow high' 'both red bold , yellow' 'both red bold , yellow high' 'both red underline , yellow' 'both red underline , yellow high' 'both red underline high , yellow' 'both red underline high , yellow high' 'both red underline bold , yellow' 'both red underline bold , yellow high' 'both green , yellow' 'both green , yellow high' 'both green high , yellow' 'both green high , yellow high' 'both green bold , yellow' 'both green bold , yellow high' 'both green underline , yellow' 'both green underline , yellow high' 'both green underline high , yellow' 'both green underline high , yellow high' 'both green underline bold , yellow' 'both green underline bold , yellow high' 'both yellow , yellow' 'both yellow , yellow high' 'both yellow high , yellow' 'both yellow high , yellow high' 'both yellow bold , yellow' 'both yellow bold , yellow high' 'both yellow underline , yellow' 'both yellow underline , yellow high' 'both yellow underline high , yellow' 'both yellow underline high , yellow high' 'both yellow underline bold , yellow' 'both yellow underline bold , yellow high' 'both blue , yellow' 'both blue , yellow high' 'both blue high , yellow' 'both blue high , yellow high' 'both blue bold , yellow' 'both blue bold , yellow high' 'both blue underline , yellow' 'both blue underline , yellow high' 'both blue underline high , yellow' 'both blue underline high , yellow high' 'both blue underline bold , yellow' 'both blue underline bold , yellow high' 'both purple , yellow' 'both purple , yellow high' 'both purple high , yellow' 'both purple high , yellow high' 'both purple bold , yellow' 'both purple bold , yellow high' 'both purple underline , yellow' 'both purple underline , yellow high' 'both purple underline high , yellow' 'both purple underline high , yellow high' 'both purple underline bold , yellow' 'both purple underline bold , yellow high' 'both cyan , yellow' 'both cyan , yellow high' 'both cyan high , yellow' 'both cyan high , yellow high' 'both cyan bold , yellow' 'both cyan bold , yellow high' 'both cyan underline , yellow' 'both cyan underline , yellow high' 'both cyan underline high , yellow' 'both cyan underline high , yellow high' 'both cyan underline bold , yellow' 'both cyan underline bold , yellow high' 'both white , yellow' 'both white , yellow high' 'both white high , yellow' 'both white high , yellow high' 'both white bold , yellow' 'both white bold , yellow high' 'both white underline , yellow' 'both white underline , yellow high' 'both white underline high , yellow' 'both white underline high , yellow high' 'both white underline bold , yellow' 'both white underline bold , yellow high' 'both black , blue' 'both black , blue high' 'both black high , blue' 'both black high , blue high' 'both black bold , blue' 'both black bold , blue high' 'both black underline , blue' 'both black underline , blue high' 'both black underline high , blue' 'both black underline high , blue high' 'both black underline bold , blue' 'both black underline bold , blue high' 'both red , blue' 'both red , blue high' 'both red high , blue' 'both red high , blue high' 'both red bold , blue' 'both red bold , blue high' 'both red underline , blue' 'both red underline , blue high' 'both red underline high , blue' 'both red underline high , blue high' 'both red underline bold , blue' 'both red underline bold , blue high' 'both green , blue' 'both green , blue high' 'both green high , blue' 'both green high , blue high' 'both green bold , blue' 'both green bold , blue high' 'both green underline , blue' 'both green underline , blue high' 'both green underline high , blue' 'both green underline high , blue high' 'both green underline bold , blue' 'both green underline bold , blue high' 'both yellow , blue' 'both yellow , blue high' 'both yellow high , blue' 'both yellow high , blue high' 'both yellow bold , blue' 'both yellow bold , blue high' 'both yellow underline , blue' 'both yellow underline , blue high' 'both yellow underline high , blue' 'both yellow underline high , blue high' 'both yellow underline bold , blue' 'both yellow underline bold , blue high' 'both blue , blue' 'both blue , blue high' 'both blue high , blue' 'both blue high , blue high' 'both blue bold , blue' 'both blue bold , blue high' 'both blue underline , blue' 'both blue underline , blue high' 'both blue underline high , blue' 'both blue underline high , blue high' 'both blue underline bold , blue' 'both blue underline bold , blue high' 'both purple , blue' 'both purple , blue high' 'both purple high , blue' 'both purple high , blue high' 'both purple bold , blue' 'both purple bold , blue high' 'both purple underline , blue' 'both purple underline , blue high' 'both purple underline high , blue' 'both purple underline high , blue high' 'both purple underline bold , blue' 'both purple underline bold , blue high' 'both cyan , blue' 'both cyan , blue high' 'both cyan high , blue' 'both cyan high , blue high' 'both cyan bold , blue' 'both cyan bold , blue high' 'both cyan underline , blue' 'both cyan underline , blue high' 'both cyan underline high , blue' 'both cyan underline high , blue high' 'both cyan underline bold , blue' 'both cyan underline bold , blue high' 'both white , blue' 'both white , blue high' 'both white high , blue' 'both white high , blue high' 'both white bold , blue' 'both white bold , blue high' 'both white underline , blue' 'both white underline , blue high' 'both white underline high , blue' 'both white underline high , blue high' 'both white underline bold , blue' 'both white underline bold , blue high' 'both black , purple' 'both black , purple high' 'both black high , purple' 'both black high , purple high' 'both black bold , purple' 'both black bold , purple high' 'both black underline , purple' 'both black underline , purple high' 'both black underline high , purple' 'both black underline high , purple high' 'both black underline bold , purple' 'both black underline bold , purple high' 'both red , purple' 'both red , purple high' 'both red high , purple' 'both red high , purple high' 'both red bold , purple' 'both red bold , purple high' 'both red underline , purple' 'both red underline , purple high' 'both red underline high , purple' 'both red underline high , purple high' 'both red underline bold , purple' 'both red underline bold , purple high' 'both green , purple' 'both green , purple high' 'both green high , purple' 'both green high , purple high' 'both green bold , purple' 'both green bold , purple high' 'both green underline , purple' 'both green underline , purple high' 'both green underline high , purple' 'both green underline high , purple high' 'both green underline bold , purple' 'both green underline bold , purple high' 'both yellow , purple' 'both yellow , purple high' 'both yellow high , purple' 'both yellow high , purple high' 'both yellow bold , purple' 'both yellow bold , purple high' 'both yellow underline , purple' 'both yellow underline , purple high' 'both yellow underline high , purple' 'both yellow underline high , purple high' 'both yellow underline bold , purple' 'both yellow underline bold , purple high' 'both blue , purple' 'both blue , purple high' 'both blue high , purple' 'both blue high , purple high' 'both blue bold , purple' 'both blue bold , purple high' 'both blue underline , purple' 'both blue underline , purple high' 'both blue underline high , purple' 'both blue underline high , purple high' 'both blue underline bold , purple' 'both blue underline bold , purple high' 'both purple , purple' 'both purple , purple high' 'both purple high , purple' 'both purple high , purple high' 'both purple bold , purple' 'both purple bold , purple high' 'both purple underline , purple' 'both purple underline , purple high' 'both purple underline high , purple' 'both purple underline high , purple high' 'both purple underline bold , purple' 'both purple underline bold , purple high' 'both cyan , purple' 'both cyan , purple high' 'both cyan high , purple' 'both cyan high , purple high' 'both cyan bold , purple' 'both cyan bold , purple high' 'both cyan underline , purple' 'both cyan underline , purple high' 'both cyan underline high , purple' 'both cyan underline high , purple high' 'both cyan underline bold , purple' 'both cyan underline bold , purple high' 'both white , purple' 'both white , purple high' 'both white high , purple' 'both white high , purple high' 'both white bold , purple' 'both white bold , purple high' 'both white underline , purple' 'both white underline , purple high' 'both white underline high , purple' 'both white underline high , purple high' 'both white underline bold , purple' 'both white underline bold , purple high' 'both black , cyan' 'both black , cyan high' 'both black high , cyan' 'both black high , cyan high' 'both black bold , cyan' 'both black bold , cyan high' 'both black underline , cyan' 'both black underline , cyan high' 'both black underline high , cyan' 'both black underline high , cyan high' 'both black underline bold , cyan' 'both black underline bold , cyan high' 'both red , cyan' 'both red , cyan high' 'both red high , cyan' 'both red high , cyan high' 'both red bold , cyan' 'both red bold , cyan high' 'both red underline , cyan' 'both red underline , cyan high' 'both red underline high , cyan' 'both red underline high , cyan high' 'both red underline bold , cyan' 'both red underline bold , cyan high' 'both green , cyan' 'both green , cyan high' 'both green high , cyan' 'both green high , cyan high' 'both green bold , cyan' 'both green bold , cyan high' 'both green underline , cyan' 'both green underline , cyan high' 'both green underline high , cyan' 'both green underline high , cyan high' 'both green underline bold , cyan' 'both green underline bold , cyan high' 'both yellow , cyan' 'both yellow , cyan high' 'both yellow high , cyan' 'both yellow high , cyan high' 'both yellow bold , cyan' 'both yellow bold , cyan high' 'both yellow underline , cyan' 'both yellow underline , cyan high' 'both yellow underline high , cyan' 'both yellow underline high , cyan high' 'both yellow underline bold , cyan' 'both yellow underline bold , cyan high' 'both blue , cyan' 'both blue , cyan high' 'both blue high , cyan' 'both blue high , cyan high' 'both blue bold , cyan' 'both blue bold , cyan high' 'both blue underline , cyan' 'both blue underline , cyan high' 'both blue underline high , cyan' 'both blue underline high , cyan high' 'both blue underline bold , cyan' 'both blue underline bold , cyan high' 'both purple , cyan' 'both purple , cyan high' 'both purple high , cyan' 'both purple high , cyan high' 'both purple bold , cyan' 'both purple bold , cyan high' 'both purple underline , cyan' 'both purple underline , cyan high' 'both purple underline high , cyan' 'both purple underline high , cyan high' 'both purple underline bold , cyan' 'both purple underline bold , cyan high' 'both cyan , cyan' 'both cyan , cyan high' 'both cyan high , cyan' 'both cyan high , cyan high' 'both cyan bold , cyan' 'both cyan bold , cyan high' 'both cyan underline , cyan' 'both cyan underline , cyan high' 'both cyan underline high , cyan' 'both cyan underline high , cyan high' 'both cyan underline bold , cyan' 'both cyan underline bold , cyan high' 'both white , cyan' 'both white , cyan high' 'both white high , cyan' 'both white high , cyan high' 'both white bold , cyan' 'both white bold , cyan high' 'both white underline , cyan' 'both white underline , cyan high' 'both white underline high , cyan' 'both white underline high , cyan high' 'both white underline bold , cyan' 'both white underline bold , cyan high' 'both black , white' 'both black , white high' 'both black high , white' 'both black high , white high' 'both black bold , white' 'both black bold , white high' 'both black underline , white' 'both black underline , white high' 'both black underline high , white' 'both black underline high , white high' 'both black underline bold , white' 'both black underline bold , white high' 'both red , white' 'both red , white high' 'both red high , white' 'both red high , white high' 'both red bold , white' 'both red bold , white high' 'both red underline , white' 'both red underline , white high' 'both red underline high , white' 'both red underline high , white high' 'both red underline bold , white' 'both red underline bold , white high' 'both green , white' 'both green , white high' 'both green high , white' 'both green high , white high' 'both green bold , white' 'both green bold , white high' 'both green underline , white' 'both green underline , white high' 'both green underline high , white' 'both green underline high , white high' 'both green underline bold , white' 'both green underline bold , white high' 'both yellow , white' 'both yellow , white high' 'both yellow high , white' 'both yellow high , white high' 'both yellow bold , white' 'both yellow bold , white high' 'both yellow underline , white' 'both yellow underline , white high' 'both yellow underline high , white' 'both yellow underline high , white high' 'both yellow underline bold , white' 'both yellow underline bold , white high' 'both blue , white' 'both blue , white high' 'both blue high , white' 'both blue high , white high' 'both blue bold , white' 'both blue bold , white high' 'both blue underline , white' 'both blue underline , white high' 'both blue underline high , white' 'both blue underline high , white high' 'both blue underline bold , white' 'both blue underline bold , white high' 'both purple , white' 'both purple , white high' 'both purple high , white' 'both purple high , white high' 'both purple bold , white' 'both purple bold , white high' 'both purple underline , white' 'both purple underline , white high' 'both purple underline high , white' 'both purple underline high , white high' 'both purple underline bold , white' 'both purple underline bold , white high' 'both cyan , white' 'both cyan , white high' 'both cyan high , white' 'both cyan high , white high' 'both cyan bold , white' 'both cyan bold , white high' 'both cyan underline , white' 'both cyan underline , white high' 'both cyan underline high , white' 'both cyan underline high , white high' 'both cyan underline bold , white' 'both cyan underline bold , white high' 'both white , white' 'both white , white high' 'both white high , white' 'both white high , white high' 'both white bold , white' 'both white bold , white high' 'both white underline , white' 'both white underline , white high' 'both white underline high , white' 'both white underline high , white high' 'both white underline bold , white' 'both white underline bold , white high') +nb=${#tab[@]} + +for i in $(seq 0 $(($nb - 1)) ) +do + coul=`python /home/vincent/scripts/create_color.py pasprompt ${tab[i]} ` + + aff="${tab[i]} : ${coul}plop$No_Color" + echo -e $aff +done