diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /indexing/texindex/ix.collapse |
Initial commit
Diffstat (limited to 'indexing/texindex/ix.collapse')
-rw-r--r-- | indexing/texindex/ix.collapse | 28 |
1 files changed, 28 insertions, 0 deletions
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" + } |