#!/bin/bash # (C) David Vajda # 2025-06-15 # Bash script excersize vorname="David" nachname="Vajda" if [[ "$1" == "$vorname" && "$2" == "$nachname" && -z "$3" ]] then echo "Das bin ich" elif [[ "$1" == "$vorname" && -z "$2" ]] then echo "das bin vielleicht ich" else date echo "Hallo Welt!!!" i=0 while [ $i -lt 8 ] do echo "Hallo zum $(($i+1))." i=$(($i+1)) done A=(a b c d) A+=(A B C D) A+=(1 2 3 4) i=0 while [ $i -lt ${#A} ] do echo "${A[$i]}" i=$(($i+1)) done for s in "${A[@]}" do echo "$s" done l=$(ls) i=0 for s in $l do echo "$s" i=$((($i+1)%8)) if [ $i -eq 0 ] then break fi done /bin/bash "$0" "$vorname" "$nachname" /bin/bash "$0" "$vorname" fi