#!/bin/bash
cat featureds formers maindate.all | awk '
BEGIN {
FS="\\|\\|"
}
/^FEATURED/ {
featured[$2] = 1
next
}
/^FORMER/ {
former[$2] = 1
next
}
{
if ($3 == "Provinces of Thailand") {
next
}
if ($3 == "1 %E2%88%92 2 %2B 3 %E2%88%92 4 %2B %C2%B7 %C2%B7 %C2%B7") {
next
}
if (featured[$3] != 1 && former[$3] != 1) {
print $0
}
}'