Ich habe dieses Beispiel direkt aus einem Buch, nur funktioniert es bei mir nicht:
Fehler: syntax error: operand expected (error token is " * " )
gruß Jongo
Code:
#! /bin/bash
array=(eins zwei drei)
typeset -i i=0 max=${#array[*]}
while (( i < max ))
do
echo "Feld $i: ${array[$i]}"
i=i+1
done
Fehler: syntax error: operand expected (error token is " * " )
gruß Jongo