diff options
Diffstat (limited to 'indexing/texindex/ix.rotate')
-rw-r--r-- | indexing/texindex/ix.rotate | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indexing/texindex/ix.rotate b/indexing/texindex/ix.rotate new file mode 100644 index 0000000000..ab3b785291 --- /dev/null +++ b/indexing/texindex/ix.rotate @@ -0,0 +1,19 @@ +# ix.rotate: awk - script zur Rotation von Index - Begriffen +# Eingabe: +# string1 string2 string3 ... \t num num ... +# Ausgabe: +# string1 string2 string3 ... \t num num ... +# string2 string3 ... , string1 \t num num ... +# string3 ..., string1 string2 \t num num ... +# +BEGIN { + FS = OFS = "\t" + } + { + print $1, $2 # Drucke die unrotierte Form + for (i=1; (j=index(substr($1, i+1)," "))> 0;) + { + i += j # Finde jeden Blank und rotiere um ihn + printf "%s, %s\t%s\n",substr($1,i+1),substr($1,1,i-1),$2 + } + } |