2 pulses_per_liter
='4380'
9 totals
="$accounts/.totals"
11 tmp
="/tmp/beertmp-$$";
12 dialog
=$
(which dialog
);
15 echo 'scale=2; '"$@" |
bc
19 pulses
=$
(wc -c "$accounts/$1" | cut
-d ' ' -f 1)
20 litres
=$
(calc
$pulses/$pulses_per_liter)
21 beers
=$
(calc
$litres/$beer_liters)
22 price
=$
(calc
$beers*$beer_price)
23 echo $beers piv
'('$price $currency, $litres l
, $pulses pulses
')'
27 "$dialog" --inputbox "New account name" 0 0 2>"$tmp"
28 [ $?
= 0 ] && touch "$accounts/$(cat "$tmp")";
32 $dialog --menu "$title servis" 0 0 0 new
"Novy stamgast" exit "Konec party" 2>"$tmp"
33 option
="$(cat "$tmp")"
41 echo "=== Totals ($totals) ==="
52 ls -1 --group-directories-first "$accounts" |
while read i
; do
53 echo -n "$i"; echo -ne "\x00";
54 echo -n $
(beer_stat
"$i"); echo -ne "\x00"
55 echo -e "$i\t$(beer_stat "$i")" >> "$totals"
56 done |
xargs -0 $dialog --menu "$title stamgasti" 0 0 0
63 stamgast
="$(cat "$tmp")"
65 echo == Cepuje stamgast
$stamgast, ukonci ctrl
+c
==
66 "$backend" |
tee -a "$accounts/$stamgast"
This page took 0.507243 seconds and 5 git commands to generate.