colors20250803.sh

#!/bin/bash

# (C) David Vajda
# 2025-07-28
# Color excersize, resistor

Colors=(Schwarz Braun Rot Orange Gelb Gruen Blau Lila Grau Weiss)
ColorsRealBackground=("\e[30m\e[97 bk \e[0m" "\e[43m br \e[40m" "\e[41m rd \e[40m" "\e[43m br \e[40m" "\e[93m\e[97m br \e[40m")

ColorsAcrynomEn=("Red: rd" "Orange: or" "Yellow: ye" "Green: gn" "Blue: bl" "Purple: pu" "Brown: br" "Black: bk" "White: wh" "Grey/Gray: gy")

colorsAcrynom=(46 bk 41 br 39 rd 31 or 101 ye 40 gr 92 bl 43 pu 98 gy 45 wh 95 si 91 go)

colors=("\e[46m \e[48m b \e[0m" "\e[46m \e[48m k \e[0m" "\e[41m \e[43m b \e[0m" "\e[41m \e[43m r \e[0m" "\e[39m \e[41m r \e[0m" "\e[39m \e[41m d \e[0m" "\e[31m \e[33m o \e[0m" "\e[31m \e[33m r \e[0m" "\e[101m \e[103m y \e[0m"  "\e[101m \e[103m e \e[0m" "\e[40m \e[42m g \e[0m" "\e[40m \e[42m r \e[0m" "\e[92m \e[94m b \e[0m"  "\e[92m \e[94m l \e[0m" "\e[43m \e[45m p \e[0m" "\e[43m \e[45m u \e[0m" "\e[98m \e[100m g \e[0m"  "\e[98m \e[100m y \e[0m" "\e[45m \e[47m w \e[0m"  "\e[45m \e[47m h \e[0m" "\e[91m \e[93m g \e[0m" "\e[91m \e[93m o \e[0m" "\e[95m \e[97m s \e[0m" "\e[95m \e[97m i \e[0m")


i=0
s1=""
s2=""
t=""
while [ $i -lt 64 ]
do
    s1=""
    s2=""
    j=0
    while [ $j -lt 5 ]
    do
        x=$((($RANDOM%12)*2))
        x1=$(($x+0))
        x2=$(($x+1))
        s1="$s1 ${colors[$x1]}"
        s2="$s2 ${colors[$x2]}"
        j=$(($j+1))
    done
    echo ""
    echo -e "$s1"
    echo -e "$s2"
    echo ""
    i=$(($i+1))
done

echo "# (C) David Vajda" 
echo "# 2025-07-28" 
echo "# Color excersize, resistor, training, output" 
date
echo "bitte nummerieren"
echo "$s"
echo ""
fname=$(date)
fname="colors$fname.out.txt"
echo "# (C) David Vajda" > "$fname"
echo "# 2025-07-28" >> "$fname"
echo "# Color excersize, resistor, training, output" >> "$fname"
echo "$s" >> "$fname"
echo "" >> "$fname"
echo "$t" >> "$fname"
echo "please compare resultate with date in $fname"
echo