#!/bin/bash
vorname="David"
nachname="Vajda"
if [[ "$vorname" == "$1" && "$nachname" == "$2" ]]
then
echo "das bin ich, Herr $vorname $nachname"
elif [[ "$vorname" == "$1" && -z "$2" ]]
then
echo "das koennte ich sein"
else
date
i=0
while [ $i -lt 10 ]
do
echo "Hallo zum $(($i+1))."
i=$(($i+1))
done
M=(a b c d)
M+=(1 2 3 4)
i=0
while [ $i -lt 8 ]
do
echo "${M[$i]}"
i=$(($i+1))
done
for s in "${M[@]}"
do
echo "$s"
done
l=$(ls)
i=0
for s in $l
do
echo "$s"
if [ $i -ge 8 ]
then
break
fi
i=$(($i+1))
done
/bin/bash "$0" "$vorname" "$nachname"
/bin/bash "$0" "$vorname"
fi
|