/media/sda-magnetic/david/Dok-15-2023-11-27/informatik/vhdl20240303/bash20240229/hello.sh


#!/bin/bash

echo "Hallo Welt"

if [[ "$1" == "David" && "$2" == "Vajda" ]]
then
    echo "Das bin ich"
elif [[ "$1" == "David Vajda" ]]
then
    echo "Das bin ich"
elif [[ "$1" == "David" && -z "$2" ]]
then
    echo "Das koennte ich sein"
elif [[ "$1" == "Vajda" && -z "$2" ]]
then
    echo "Das koennte ich sein"
elif [ -n "$1" ]
then
    echo "Das bin nicht ich"
elif [ -z "$1" ]
then
    i=0
    while [ $i -lt 10 ]
    do
        echo "Hallo zum $(($i+1))."
        i=$(($i+1))
    done

    a=(Dies ist ein Array)
    a+=(Und dies ist an das Array angehaengt)

    for s in "${a[@]}"
    do
        echo "$s"
    done

    i=0
    while [ $i -lt 11 ]
    do
        echo "${a[$i]}"
        i=$(($i+1))
    done

    l=$(ls)
    for s in $l
    do
        echo "$s"
    done
fi