colors20250728.sh

#!/bin/bash

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

Colors=(Schwarz Braun Rot Orange Gelb Gruen Blau Lila Grau Weiss)

i=0
s=""
t=""
while [ $i -lt 64 ]
do
    x=$(($RANDOM%10))
    s="$s ${Colors[$x]}"
    i=$(($i+1))
    t="$t $x"
done

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