#!/bin/bash BUG=$(formail -cz -x Subject | sed 's/^.*\([Bb]ug#\)\([0-9]\{1,\}\):.*$/\2/i') bts reportspam $BUG &