From 923533b96d6643e386aa2b917657fc8384977d69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Einar=20J=C3=B8rgen=20Haraldseid?= Date: Mon, 14 Jan 2019 15:53:09 +0100 Subject: [PATCH 1/1] Nye retter\! --- middag.sh | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/middag.sh b/middag.sh index dbb0e14..38ec5ae 100755 --- a/middag.sh +++ b/middag.sh @@ -6,13 +6,19 @@ Prep=( 'Grillet' 'Gratinert' 'Bakt' + 'Fritert' ) Meat=( 'laks' - 'biff' + 'indrefilet av svin' + 'indrefilet av storfe' 'kylling' + 'kalkun' 'grøt' + 'torsk' + 'kotelett' + 'løvbiff' ) Sides=( @@ -22,15 +28,34 @@ 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]}" -- 2.30.2