From ac4b80be810fc615b426557ad86f0cb8092f5304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 3 Dec 2020 17:18:03 +0100 Subject: add files --- buch/common/farbseiten.sh | 217 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 buch/common/farbseiten.sh (limited to 'buch/common/farbseiten.sh') diff --git a/buch/common/farbseiten.sh b/buch/common/farbseiten.sh new file mode 100644 index 0000000..afccf66 --- /dev/null +++ b/buch/common/farbseiten.sh @@ -0,0 +1,217 @@ +#! /bin/bsh +# +# farbseiten.sh -- Formattierung der Farbseiteninfo für die Druckerei +# +# (c) 2020 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# +awk 'BEGIN { + result = "" + counter = 0 +} +{ + if (length(result) == 0) { + result = $1 + } else { + result = sprintf("%s,%d", result, $1) + } + counter++ +} +END { + printf("%s\n", result) + printf("Anzahl Farbseiten: %d\n", counter) +}' <