Middagsgenerator
[einar-bin] / middag.sh
1 #!/bin/bash
2
3 Prep=(
4 'Kokt'
5 'Stekt'
6 'Grillet'
7 'Gratinert'
8 'Bakt'
9 )
10
11 Meat=(
12 'laks'
13 'biff'
14 'kylling'
15 'grøt'
16 )
17
18 Sides=(
19 'poteter'
20 'ris'
21 'wokgrønsaker'
22 'kokte grønsaker'
23 'fries'
24 'salat'
25 )
26
27 PrepCount=0
28 while [ "x${Prep[PrepCount]}" != "x" ]; do
29 ((PrepCount++))
30 done
31
32 MeatCount=0
33 while [ "x${Meat[MeatCount]}" != "x" ]; do
34 ((MeatCount++))
35 done
36
37 SideCount=0
38 while [ "x${Sides[SideCount]}" != "x" ]; do
39 ((SideCount++))
40 done
41
42 PrepN=$RANDOM
43 (( PrepN %= $PrepCount ))
44
45 MeatN=$RANDOM
46 (( MeatN %= $MeatCount ))
47
48 SideN=$RANDOM
49 (( SideN %= $SideCount ))
50
51 echo "${Prep[PrepN]} ${Meat[MeatN]} med ${Sides[SideN]}"