'Grillet'
'Gratinert'
'Bakt'
+ 'Fritert'
)
Meat=(
'laks'
- 'biff'
+ 'indrefilet av svin'
+ 'indrefilet av storfe'
'kylling'
+ 'kalkun'
'grøt'
+ 'torsk'
+ 'kotelett'
+ 'løvbiff'
)
Sides=(
'kokte grønsaker'
'fries'
'salat'
+ 'couscous'
+ 'søtpotetfries'
+ 'risotto'
+ 'potetmos'
)
+PrepCount=0
+while [ "x${Prep[PrepCount]}" != "x" ]; do
+ ((PrepCount++))
+done
+
+MeatCount=0
+while [ "x${Meat[MeatCount]}" != "x" ]; do
+ ((MeatCount++))
+done
+
+SideCount=0
+while [ "x${Sides[SideCount]}" != "x" ]; do
+ ((SideCount++))
+done
+
PrepN=$RANDOM
-(( PrepN %= ${#Prep[@]} ))
+(( PrepN %= $PrepCount ))
MeatN=$RANDOM
-(( MeatN %= ${#Meat[@]} ))
+(( MeatN %= $MeatCount ))
SideN=$RANDOM
-(( SideN %= ${#Sides[@]} ))
+(( SideN %= $SideCount ))
echo "${Prep[PrepN]} ${Meat[MeatN]} med ${Sides[SideN]}"