### /u/sy/beebe/tex/bib/find-possessive-title-words.awk, Mon Feb 4 16:45:00 2002 ### Edit by Nelson H. F. Beebe ### ==================================================================== ### Display a sorted list of unique possessive title words from one ### or more prettyprinted BibTeX files, excluding words which are ### already braced. ### ### Usage: ### bibclean -max-width 0 -no-warb BibTeX-file(s) | \ ### awk -f find-hyphenated-title-words.awk ### ### [04-Feb-2002] ### ==================================================================== BEGIN { Sort_Pipe = "sort | uniq -c" } /^ *(booktitle|title) *= *".*[^}]('s|s')/ { do_title($0) } END { close(Sort_Pipe)} ### ==================================================================== function do_title(s, k,n,parts) { sub("^[^\"]*\"","",s) sub("\",","",s) n = split(s,parts,"[ :;]") for (k = 1; k <= n; ++k) { if (parts[k] ~ "('s|s')") print parts[k] | Sort_Pipe } }