100825/tex/sh092625.sh

#!/bin/bash

# (c) David Vajda
# 09/26/25
# bash script excersize

divisor=$(("$2"))
dividend=$(("$1"))

if [[ $divisor -ne 0 && $(($dividend%$divisor)) -eq 0 ]]
then
    echo "the first arguments let the second fits in!!!"
else
    date
    echo "hello, my name is $0"
    i=0
    while [ $i -lt 12 ]
    do
        echo "$i. hello!!!"
        i=$(($i+1))
    done
    M=()
    while [ $i -lt 12 ]
    do
        M+=($(($RANDOM%24)))
        i=$(($i+1))
    done
    i=0
    s=""
    while [ $(($i)) -lt 12 ]
    do
        s="$s ${M[$i]}"
        i=$(($i+1))
    done
    echo "$s"
    /bin/bash "$0" 10 5
fi