/media/sda-magnetic/david/Dokumente-16-2024-08-01/informatikUmathematik/vhdl20240524/bash20240521.sh


#!/bin/bash

if [[ "$1" == "David" && "$2" == "Vajda" ]]
then
    echo "Hallo, das bin ich"
elif [[ "$1" == "David" && -z "$2" ]]
then
    echo "Hallo, 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 ich nicht"
else
    echo "Hallo Welt"

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

    a=(Hallo das sage ich)
    a+=(Aber auch das)

    i=0

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

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

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

fi