ref: a35484265f9fb32d9faa2064ad24d8dec99ba919
dir: /bin/sm2geradd/
#!/bin/rc awk -F' +' -v 'p=/usr/qwx/p/sm2/ger' -v 'dict=/usr/qwx/p/sm2/ger/db' ' $1 != ""{ f = $1 gsub("[\\[\\(,]+.*", "", f) h = f gsub(" ", ".", f) last = p "/" f ".t" if(system("test -f " last) == 0) print f ": appending to existing file" else print "2.5 0 0 0 " f ".pdf" >>dict printf "%s\n.Bp\n%s\n\n%s\n", h, $1, $2 >>last close(last) } $1 == "" && NF > 1{ sub("^ ", "") printf "\n%s\n", $0 >>last close(last) } ' $* echo remember to add to other collections!