./vhdl20250304/sedheadtail20250216.sh


#!/bin/bash


i=0
while [ $i -lt 6 ]
do
    j=0
    str=""
    while [ $j -lt 64 ]
    do
        str+=$((1 + $RANDOM % 10))
        j=$(($j+1))
    done
    echo $str
    echo $str >> $0.txt
    i=$(($i+1))
done

cat $0.txt | sed 's/6.*6/Hier standen wir zwischen zwei 6ern/g'> $0_2.txt

i=0
while [ $i -lt 6 ]
do
    head $0_2.txt -n $i | tail -n $((6-$i))
    echo " "
    echo " "
    echo " "
    i=$(($i+1))
done