#!/usr/bin/awk -f # dirty xml reading is more fun BEGIN { FS = "" } { printdefs($1, $2); } function printdefs(word, defs) { n = split(defs, array, ""); for(i=0; i<=n; i++) { if(array[i] != "") { printf(":%s: %s\n", word, array[i]); } } }