-
Notifications
You must be signed in to change notification settings - Fork 7
/
kiosk
executable file
·42 lines (39 loc) · 1.05 KB
/
kiosk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
echo " 1 - Fruits $"10""
echo " 2 - Vegetables $"5""
echo " 3 - Babyfood $"20""
echo " 4 - Milk $"5""
num1=10
num2=5
num3=20
num4=5
read -p "Please chose all products you want to buy: " pl pl1 pl2 pl3 pl4
if [ "$pl" == 1 ]
then
read -p "Please insert money: " money
total=$(($money - 10))
echo "********************************"
echo "Here is your total change $total"
echo "********************************"
elif [ "$pl" == 2 ]
then
read -p "Please insert money: " money
total=$(($money - 5))
echo "********************************"
echo "Here is your total change $total"
echo "********************************"
elif [ "$pl" == 3 ]
then
read -p "Please insert money: " money
total=$(($money - 20))
echo "********************************"
echo "Here is your total change $total"
echo "********************************"
elif [ "$pl" == 4 ]
then
read -p "Please insert money: " money
total=$(($money - 5))
echo "********************************"
echo "Here is your total change $total"
echo "********************************"
fi