X-Git-Url: https://git.slaskete.net/einar-bin/blobdiff_plain/923533b96d6643e386aa2b917657fc8384977d69..61690daa9b77c717dc82f26c81696449140ebded:/middag.sh diff --git a/middag.sh b/middag.sh index 38ec5ae..ee3fbe9 100755 --- a/middag.sh +++ b/middag.sh @@ -7,6 +7,8 @@ Prep=( 'Gratinert' 'Bakt' 'Fritert' + 'Dampet' + 'Posjert' ) Meat=( @@ -19,6 +21,8 @@ Meat=( 'torsk' 'kotelett' 'løvbiff' + 'sau' + 'egg' ) Sides=( @@ -27,6 +31,7 @@ Sides=( 'wokgrønsaker' 'kokte grønsaker' 'fries' + 'smør, sukker og kanel' 'salat' 'couscous' 'søtpotetfries' @@ -34,28 +39,19 @@ Sides=( '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 %= $PrepCount )) +(( PrepN %= ${#Prep[@]} )) MeatN=$RANDOM -(( MeatN %= $MeatCount )) +(( MeatN %= ${#Meat[@]} )) SideN=$RANDOM -(( SideN %= $SideCount )) +(( SideN %= ${#Sides[@]} )) + +if (( RANDOM % 4 == 0 )); then + Bacon=" og bacon" +else + Bacon="" +fi -echo "${Prep[PrepN]} ${Meat[MeatN]} med ${Sides[SideN]}" +echo "${Prep[PrepN]} ${Meat[MeatN]} med ${Sides[SideN]}${Bacon}"