2025-07-18 ...before ...sh20250716.sh

#!/bin/bash

# (C) David Vajda
# 2025-07-16
# shell skript excersize

firstname="David"
lastname="Vajda"

if [[ "$firstname" == "$1" && "$lastname" == "$2" && -z "$3" ]]
then
    echo "Das bin ich"
elif [[ "$firstname" == "$1" && -z "$2" ]]
then
    echo "ich koennte es sein"
else
    echo "(C) David Vajda"
    echo "written: 2025-07-16"
    echo "shell skript excersize"
    date
    echo "Hallo Welt"

    i=0
    while [ $i -lt 8 ]
    do
        echo "hallo zum $(($i+1))."
        i=$(($i+1))
    done

    M=(a b c d)
    M+=(e f g h)
    for s in "${M[@]}"
    do
        "$s"
    done
    i=0
    s=""
    while [ $i -lt 8 ]
    do
        s="$s${M[$i]}"
        i=$(($i+1))
    done
    echo "$s"
    l=$(ls)
    i=0
    for s in $l
    do
        echo "$s"
        i=$((($i+1)%8))
        if [ $i -eq 0 ]
        then
            exit
        fi
    done

    /bin/bash "$0" "$firstname" "$lastname"
    /bin/bash "$0" "$firstname"
fi