User:MurphBot/Category:Users

This is my Unix shell script for adding  to any pages in Category:Users which do not already have it or a sort key specified for the category. Without a sort key, the default is to sort as User:..., producing a rather ugly result in the category.

Code

 * 1) !/bin/sh

python replace.py -cat:Users \ -summary:"Category sort key" \ -excepttitle:WoWWiki- \ -excepttext:DEFAULTSORT \ -regex \ '(?msi)\[\[Category:\s*Users]]' \ '\n'

python replace.py -cat:Users \ -summary:"Category sort key" \ -excepttext:DEFAULTSORT \ -regex \ '(?msi)\[\[Category:\s*Users]]' \ '\n'