Files
Grenzland-Zine/plan.sh
2026-01-24 09:53:15 +01:00

22 lines
516 B
Bash

#!/bin/sh
# plan.sh - berechnet den Heftpreis und die erforderliche
# Auflage in Abhängigkeit von der Anzahl der Belegexemplare
# sh plan.sh <Belegexemplare>
LC_NUMERIC=C
druckpreis=2.81
if [ $# -gt 0 ]
then
belegexemplare=$1
else
echo -n "Belegexemplare? "
read belegexemplare
fi
for heftpreis in 3.5 4 4.5 5 5.5 6 6.5 7
do
belegpreis=`echo "$belegexemplare $druckpreis 2 +*p" | dc`
auflage=`echo "$belegexemplare $belegpreis $heftpreis $druckpreis-/+p" | dc`
printf "%4.2f\t%i\n" $heftpreis $auflage
done