Awk and other Unix utilities
Ahh.. Where else can you do smth like:
awk ‘/PAGE\[Q/ {split($4,fields,"[");print fields[2];}’ dts.output | awk -F, ‘{print $1;}’ | sort | uniq > filtered.output
To take in a page of 3000+ lines messy text n info and get exactly what you want in 218 lines.