#!/bin/sh
sqlite3 trac.db "select cc from ticket group by cc;" |grep $OLDNAME | awk '{system("echo update ticket set cc=`echo "$0" |sed -e s/'$OLDNAME'/'$NEWNAME'/g` where cc="$0"\\;")}' |sed -e s/cc=/cc=\"/g -e s/\;/\"\;/g -e "s/ where/\" where/g" | sqlite3 trac.db
