#!/bin/sh

( grep -r "06[^0-9][0-9][0-9][^0-9][0-9][0-9][^0-9][0-9][0-9][^0-9][0-9][0-9]" . ; grep -r "06[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][^0-9]" . ; grep -r "06[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\$" . ) | grep -v References | grep -v -i Message-ID | grep -v In-Reply-To > /tmp/1
iconv -c < /tmp/1 | sed -e 's/06\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)/06 \1 \2 \3 \4/g' -e 's/^\([^:]*\):.*06[^0-9]\([0-9][0-9]\)[^0-9]\([0-9][0-9]\)[^0-9]\([0-9][0-9]\)[^0-9]\([0-9][0-9]\).*/\1:06 \2 \3 \4 \5/g' > /tmp/2
