From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- indexing/texindex/ix.collapse | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 indexing/texindex/ix.collapse (limited to 'indexing/texindex/ix.collapse') diff --git a/indexing/texindex/ix.collapse b/indexing/texindex/ix.collapse new file mode 100644 index 0000000000..cedcd045ab --- /dev/null +++ b/indexing/texindex/ix.collapse @@ -0,0 +1,28 @@ +# ix.collapse : awk - script +# kollabiere Zahlenlisten bei identische Begriffe +# Eingabeformat : +# string1 \t num +# string2 \t num +# string2 \t num +# ... +# Ausgabeformat: +# string1 \t num +# string2 \t num, num +BEGIN { + altwort = "ASDF!@#$*&%$IU11@" + FS = OFS = "\t" + } +$1 != altwort { + if (NR > 1) + printf "\n" + altwort = $1 + printf "%s\t%s", $1, $2 + next + } + { + printf " %s",$2 + } +END { + if (NR > 1) + printf "\n" + } -- cgit v1.2.3