Issue 7 printed and uploaded
This commit is contained in:
21
plan.sh
Normal file
21
plan.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user